Idle Animation

Get help using Construct 2

Post » Sat Aug 31, 2013 8:23 pm

I'm trying make my sprite do one of 3 animations randomly when it is left idle. I used the tutorial at https://www.scirra.com/tutorials/440/call-random-animations-with-an-array and it is not working.

My array is named: IdleAnimationSelect

The name of the sprite is "PlayerAnimations" the names of the idle animations within it are: Still, Bubble and Sleep.

Here is my code:

B
18
S
2
Posts: 61
Reputation: 902

Post » Sat Aug 31, 2013 8:29 pm

Why not just set animation to choose("Still", "Bubble", "Sleep") ? I'm not sure what exactly your problem is though as you didn't say what's wrong.

Edit: You're checking for IdleTick to be >= 20 which is only a 3rd of a second. Try increasing that to at least 2 or 3 secondsEncryptedCow2013-08-31 20:36:38
B
47
S
14
G
7
Posts: 603
Reputation: 8,151

Post » Sat Aug 31, 2013 9:15 pm

I did try - "if platform is not moving (also tried if 8 direction is not moving), wait 5 seconds, set animation to Bubble, wait 5 seconds, set animation to Sleep" but the animation would restart unpredictably during gameplay.

Having a random animation play after a certain amount of idle time seemed like a great idea but I'm not clear why this is not working. I set the timer low so I can see the result right away when I'm testing it. It was set to 300 and it still did not work.
B
18
S
2
Posts: 61
Reputation: 902

Post » Sat Aug 31, 2013 9:16 pm

the problem is that after the set amount of idle time, those "idle" animations are not playing randomly or otherwise at all.

@cvp... do you know anything about this?Eliyahna2013-09-01 18:20:54
B
18
S
2
Posts: 61
Reputation: 902


Return to How do I....?

Who is online

Users browsing this forum: corporatedrone and 24 guests