|
Black screen (well at least the logo's show up!)
#220523
08/07/08 13:57
08/07/08 13:57
|
Joined: Aug 2008
Posts: 55 United Kingdom
CdeathJD
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2008
Posts: 55
United Kingdom
|
Ok i am getting a black screen problem! here is my code:
================================================================ /////////////////////////////////////////////////////////////// #include <acknex.h> #include <default.c>
/////////////////////////////////////////////////////////////// fps_max=100;
VECTOR camera_rot; ENTITY* picture;
wait(5);
camera.x = 0; camera.y = -500; camera.z = 0;
picture=ent_create( "untitled.bmp",vector(0,0,0) )
function main() { vec_set(camera_rot,picture.x); vec_sub(camera_rot,camera.x); vec_to_angle( camera.pan ,camera_rot); wait(1); } =============================================================
"Untitled.bmp" is a picture in the same directory as the script. The code in the func_main should make the camera point at the loaded sprite... but doesn't! Besides the shareware logos the screen is blank!
I am a noob to this... Blitz3D is where i am best at!
|
|
|
Re: Black screen (well at least the logo's show up!)
[Re: Petra]
#220578
08/07/08 14:34
08/07/08 14:34
|
Joined: Aug 2008
Posts: 55 United Kingdom
CdeathJD
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2008
Posts: 55
United Kingdom
|
but i have no level that i want to open i just want to create some entities. The code DOES do something it asks the camera to look at the sprite. Seeing as the program has loaded and not errored why has it not pointed the camera at the object... thus making it visible on screen?
I am a noob to this... Blitz3D is where i am best at!
|
|
|
Re: Black screen (well at least the logo's show up!)
[Re: CdeathJD]
#220580
08/07/08 14:35
08/07/08 14:35
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
i don't use A7, but i don't think they've changed the way you code that much? try
///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////
fps_max=100;
ENTITY* picture;
function fncLookAtObject(ent){
me = ent; //set me as ent that's been passed, now this function can be used more than once =)
var camera_rot[3]; //declaring this a function will make it local to this function only
vec_set(camera_rot,my.x);
vec_sub(camera_rot,camera.x);
vec_to_angle(camera.pan,camera_rot);
}
function fncCreatePicture{
picture = ent_create("untitled.bmp",vector(0,0,0),null); //you had to assign an action in A6, not sure about A7 (that's the null part)
//for vector(0,0,0) you can put nullvector
fncLookAtObject(picture);
}
function main()
{
level_load("myLevel.wmb"); //change this to your level name
wait(2);
vec_set(camera.x,vector(0,-500,0); //sets the position of the camera
fncCreatePicture(); //calls the create picture function =D
} Hope this helps... if A6 didn't get swept away too much =/
|
|
|
Re: Black screen (well at least the logo's show up!)
[Re: MrGuest]
#220582
08/07/08 15:04
08/07/08 15:04
|
Joined: Aug 2008
Posts: 55 United Kingdom
CdeathJD
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2008
Posts: 55
United Kingdom
|
Thanks but it didnt work. I also DID try going through the LITE-C beginners workshops.. but it asks in one of them to open up the WED editor... which doesnt work on my computer :'(
I am a noob to this... Blitz3D is where i am best at!
|
|
|
Re: Black screen (well at least the logo's show up!)
[Re: cro_games]
#220587
08/07/08 15:15
08/07/08 15:15
|
Joined: Aug 2008
Posts: 55 United Kingdom
CdeathJD
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2008
Posts: 55
United Kingdom
|
Just load a blank level..
FUNCTION main() { level_load(null); wait(1); ... Ta but im thinking of giving up on this game engine... its seems well bugged and backwards, frequently crashes and WED editor wont even run. Shame! It looked so pretty too!
I am a noob to this... Blitz3D is where i am best at!
|
|
|
Re: Black screen (well at least the logo's show up!)
[Re: CdeathJD]
#220589
08/07/08 15:28
08/07/08 15:28
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: Black screen (well at least the logo's show up!)
[Re: Blade280891]
#220590
08/07/08 15:35
08/07/08 15:35
|
Joined: Aug 2008
Posts: 55 United Kingdom
CdeathJD
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2008
Posts: 55
United Kingdom
|
XP Pro, intel petium 4 3.20ghz with 3gb RAM and and ATI HD2900 video card... and yes i have tried turning it off and on again! :p
Last edited by CdeathJD; 08/07/08 15:36.
I am a noob to this... Blitz3D is where i am best at!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|