hey, couple of simple questions
How do you use 'accelerate' without the system crashing and I mean a simple program I'm literally messing about with script 18 from the online tutorial pack of scripts.
var accel = 5
var accelneg = -5
function main()
{
level_load ("work18.wmb");
}
action move_me()
{
while(!key_cuu) wait(1); // wait for up key
while(1)
{
if (key_cuu) accelerate(NULL, accel, 1) ;
if (key_cud) accelerate(NULL, accelneg, 1);
var distance_fwdorbck = (key_cuu-key_cud) *5*time_step;
c_move(me, vector(distance_fwdorbck,0,0), NULL, GLIDE);
my.pan += (key_cul-key_cur)*2*time_step;
wait(1);
}
}
It runs the program fine, but then says system crash in move_me: SYS in an error window when I run the program and press up.
If you don't know why the above happens could you tell me how to accelerate an object another way
Cheers.