How do I Set Animation Frame to Variable?

Get help using Construct 2

Post » Wed May 11, 2016 6:06 pm

Is it possible for each individual animation frame to have its own variable? For example: Animation Frame 0 = AnimFrame0 (variable), etc., etc.

Thank You
InsertCoin25
B
4
G
1
Posts: 17
Reputation: 530

Post » Wed May 11, 2016 6:15 pm

Are you asking if animation frames can be stored in a variable as animation frames or if animation frames can be set based on variable value?

Not sure why you would need option 1... but two, yes via action set frame... as long as you have event in place to know what frame goes with what value you can.. ie. AnimFrame = 0 action set frame 1.. etc
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Thu May 12, 2016 5:58 am

Yes you can make your animation as a variable

Solution:
system On variable "animation"=0>>> "player" set animation "Walk" or "Run"

system On variable "animation"=1>>> "player" set animation "Walk" or "Run"

So insert à New ligne
When I press A>> SYSTEM SET ANIMATION TO YOUR NUMBER SET VARIABLE
B
11
S
1
Posts: 28
Reputation: 1,963


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 26 guests