|
Re: Trouble opening levels
[Re: Widi]
#319655
04/16/10 13:06
04/16/10 13:06
|
Joined: Mar 2010
Posts: 56 Hertfordshire, England
Panda_Dude
OP
Junior Member
|
OP
Junior Member
Joined: Mar 2010
Posts: 56
Hertfordshire, England
|
ah ok, that makes sense. Thanks. --------- However, after trying that, the plane doesn't even appear. I'm sure I got the coordinates right. I got them off of the bar at the bottom of WED.
Last edited by Panda_Dude; 04/16/10 13:32.
|
|
|
Re: Trouble opening levels
[Re: Panda_Dude]
#319690
04/16/10 19:48
04/16/10 19:48
|
Joined: Mar 2010
Posts: 56 Hertfordshire, England
Panda_Dude
OP
Junior Member
|
OP
Junior Member
Joined: Mar 2010
Posts: 56
Hertfordshire, England
|
sorry for my impatience, but i have 3 days till i go back to school and after that I won't have much spare time to work on things. Is my problem above because of the code? This is the whole code
#include <acknex.h>
#include <default.c>
ENTITY* plane;
function main ()
{
level_load ("work08.wmb");
wait (2);
}
function move_plane ()
{
plane = me;
my.ambient = 100;
while (1)
{
if (key_a)
my.pan += 3*time_step;
if (key_d)
my.pan -= 3*time_step;
if (key_w)
c_move (me,vector(0,15*time_step,0), nullvector, GLIDE);
wait (1);
}
}
plane = ent_create("mig.mdl",vector(0,4,66), move_plane);
|
|
|
Re: Trouble opening levels
[Re: Panda_Dude]
#319692
04/16/10 20:12
04/16/10 20:12
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
plane = ent_create("mig.mdl",vector(0,4,66), move_plane); That have to be in a function !!!!! Set it after the wait(2) from the function main().
#include <acknex.h>
#include <default.c>
ENTITY* plane;
function move_plane ()
{
// plane = me; // set already at ent_create...
my.ambient = 100;
while (1)
{
if (key_a)
my.pan += 3*time_step;
if (key_d)
my.pan -= 3*time_step;
if (key_w)
c_move (me,vector(0,15*time_step,0), nullvector, GLIDE);
wait (1);
}
}
function main ()
{
level_load ("work08.wmb");
wait (2);
plane = ent_create("mig.mdl",vector(0,4,66), move_plane);
}
Last edited by Widi; 04/16/10 20:13.
|
|
|
|