how to make your enemy shoot you

Talk about making games.

how to make your enemy shoot you

Postby raminjoon » Thu Jul 21, 2011 4:59 am

Hi lets say you got a enemy standing/facing toward you ok, how can I design the angle of his bullets that it will hit me either on left or right side of the screen or just have it directly come toward me. let me make this clear the position between me and my character in the game is like if I am standing in front of the mirror and watching myself. thats the position I am talking about but I want to have the character to shoot and have the bullets go either <-- /\ \/ --> left, up, down, right of the screen or even toward me directly. so Plz see if you can help me with this.
if you have any questions plz reply.
raminjoon
 
Posts: 40
Joined: Tue Jul 05, 2011 5:34 am
Location: Denver, Co.
Score: 3 Give a positive score

Re: how to make your enemy shoot you

Postby Bee-Ant » Mon May 21, 2012 1:59 am

Bullet -> Create Actor -> Script Editor:
Code: Select all
angle=direction(x,y,Player.x,Player.y);
directional_velocity=15;
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest