was wondering if someone knows the formula to make a bullet come from the pipe of a gun(top down).
If i rotate my actor it gets unsystematic with the pipe. And i need to make the bullet to start a bit further, ells it looks like my actor is spiting the bullets..
I have tried this code and it wont work.
player -> keydown
- Code: Select all
int i;
i = ActorCount("flames")-1;
CreateActor("flames", "flames", "(none)", "(none)", 0, 0, false);
getclone("flames.i")->x=player.x + 100 * radtodeg(cos(player.angle)) ;
getclone("flames.i")->y=player.y + 100 * radtodeg(sin(player.angle)) ;
I have used this formula in another game engine (director -__- and that shit is not to play with) and there it worked. Thought i have translate it.
Appreciate any help!
Cheers
Granlord