Make actor shoot left or right
15handsmedia
Member Posts: 0
I tried searching for this but didnt come up with anything that worked. I have an actor that i need to shoot right when facing right and shoot left when facing left. I made a rule in the bullet that uses an attribute faceleft or faceright. right now when i shoot the bullet stays in center of actor until you press left or right and the bullet follows the actor. how do i fire a bullet and let it continue the way it was shot?
Answers
-Group
-Rule-
-When [ALL]
-Keypress(Fire)
-Boolean(FacingRight) = True
-DO
-Spawn Actor (Bullet)
-In Direction 0
-Rule-
-When [ALL]
-Keypress(Fire)
-Boolean(FacingRight) = False
-DO
-Spawn Actor (Bullet)
-In Direction 180
-/Group
ACTOR: BULLET
-MOVE
-In Direction 0
-Relative to Actor
(changing a boolean from true to false on the prototype does not change it on the instance actor... so make sure you are manipulating your instance actor when testing)
Grim
when the actor is moved right it will stay true until the move left button is hit, and then it will stay false until the move right button is hit again
If your still stuck i will have a look to see how i did it but the above sounds good to me.
Darren.