How do I make the player shooting while walking?

Get help using Construct 2

Post » Fri May 13, 2016 6:04 pm

Hello, so I am trying to make my player shoot and while he is not moving the shooting animation runs just fine, but while walking the shooting animation only plays one frame, then it goes to the walking animation. Please help :(

My code is something like this:

PlayerBox, on stopped > Set animation "to Idle"
PlayerBox, on moved > Set animation to "Walk"

On left button clicked > Set animation to "Shoot"
B
3
Posts: 1
Reputation: 175

Post » Fri May 13, 2016 9:01 pm

Give PlayerBox a boolean instance variable, we'll call it Shooting.

PlayerBox, on stopped & PlayerBox is not Shooting > Set animation to "Idle"
PlayerBox, on moved & PlayerBox is not Shooting > Set animation to "Walk"
On left button clicked > Set Shooting to True
PlayerBox is Shooting > Set animation to "Shoot"
Playerbox animation Shoot has finished > set Shooting to False
Image



Coming soon on Steam!
B
16
S
9
G
3
Posts: 204
Reputation: 3,466


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], NumberOne and 5 guests