How do I Check The Animation?

Get help using Construct 2

Post » Tue Nov 22, 2016 9:04 pm

I am trying to create different guns for my game and I need it to check what weapon the player has, To change the firing speed of the gun depending on the gun the player has (The different weapons are different animations)

Thanks!
B
5
S
1
Posts: 12
Reputation: 349

Post » Tue Nov 22, 2016 9:31 pm

There are several expressions that look @ animations. Use the "AnimationName" expression to return the Name of the current animation your gun object is using.

ex. "someObject.AnimationName"
B
7
S
2
Posts: 14
Reputation: 512

Post » Tue Nov 22, 2016 9:44 pm

I know that but what condition would I put?
B
5
S
1
Posts: 12
Reputation: 349

Post » Tue Nov 22, 2016 9:52 pm

Maybe use the "compare two values" condition. Something like

condition: [sprite].AnimationName = "Machine Gun"
---> action: set your fire rate to a number
B
7
S
2
Posts: 14
Reputation: 512


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], FacuLNF and 72 guests