Posted By: prog
rocket - 05/31/07 11:57
how to atach a rocket to a spaceship at runtime and if i press anykey the rocket should come out of the spaceship(shoot out) and disappear.
Posted By: tompo
Re: rocket - 05/31/07 12:27
to create rocket write in player action:
if("your_key" ==1){you = ent_create("rocket.mdl",my.x,rocket_fun);}
function rocket_fun
{
my.passable = on; //to avoid colision with ship
my.pan = you.pan; my.tilt = you.tilt;
while(me)
{
c_move(me, bla bal bla); //read help
//then... if hit something or distance (my.x, player.x)> something or... whatever YOu want to
ent_remove(me);
wait(1);
}
}
Posted By: Nems
Re: rocket - 05/31/07 19:51
Check out the AUM magazine series too, you'll find almost everything exampled or answered for most projects.
Earlier editions may need script updates.