Page 1 of 1

Shooting in different directions

PostPosted: Tue Jan 27, 2009 7:40 am
by metaknight22
How can I make my actor shoot in 2 different directions. I've looked at other posts but they don't make sense to me. Can anyone explain in simpler terms???

Re: Shooting in different directions

PostPosted: Wed Jan 28, 2009 12:37 am
by skydereign
There are many ways to do this. One way: You will need to create a direction variable. When you press RIGHT, it sets the variable to 1, when you press LEFT, it makes it -1. Upon the creation of the projectile use this code;
Code: Select all
xvelocity=5*dir; // 5 is the speed you want, dir is the direction variable