[solved]How do I :Choose randomly between 2 animation cycles

Get help using Construct 2

Post » Thu Apr 02, 2015 11:41 am

Hi,
Please help me out with this issue.
I have a character with 2 animations for idle namely "idle1" and "idle2". This a basic platformer game.
"idle2" basically has a blink and "idle1" doesn't.
I want make it so that C2 plays either one of these animations at random so it feels like the character blinks randomly and not in a predictable pattern.

I have used the condition
when platform not moving- choose("idle1',idle2") play from beginning.
My understanding after looking through the forums is that this will make C2 choose between one of these cycles randomly.
But right now all it is doing is stuttering in place like its trying to play a frame again and again.

Image

Please take a look at my capx from this link if you are able...i have stripped it down so we can focus on the problem.
https://www.dropbox.com/s/4b2dv03k1cllf ... .capx?dl=0


Thanks muchly in advance
Last edited by hyenaman on Thu Apr 02, 2015 12:53 pm, edited 1 time in total.
B
17
S
4
Posts: 19
Reputation: 1,826

Post » Thu Apr 02, 2015 12:09 pm

when platform not moving..................choose("idle1',idle2")
Trigger once....
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Thu Apr 02, 2015 12:22 pm

Hi..
Thanks for the response...
Trigger once will have it repeat what ever animation was chosen.If it choses idle2 then idle 2 will be repeated until another input is provided.

I want it like the below scenario..
lets say idle1 was chosen first ...after the animation is played once i want it to choose either idle2 or idle1 again after that animation has played once.. it again chooses between idle2 or 1....so on and so forth..every time the player is not moving.
I hope that made it more clear...

Thanks again.
B
17
S
4
Posts: 19
Reputation: 1,826

Post » Thu Apr 02, 2015 12:33 pm

Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Thu Apr 02, 2015 12:51 pm

That does it wonderfully..
Thank you soo much...
And sorry to trouble you for something this straight forward..
-cheers
B
17
S
4
Posts: 19
Reputation: 1,826


Return to How do I....?

Who is online

Users browsing this forum: evillair, Yahoo [Bot] and 61 guests