Setting duration of looping animations

Get help using Construct 2

Post » Sun Apr 07, 2013 8:50 pm

My file: https://www.dropbox.com/s/svllzhvoczdit2y/Animation%20Test2.capx

Intended behviour:

On start of layout, Deer spawn with a randomly chosen idle animation (this part works)

After that, you can see the following conditions for when different animations finish; i.e. if the DeerUp animation finishes playing, then choose from two other idle animations to play after.

The problem is with the two idle animations (DeerEat, DeerWag) that are set to both Loop and Ping-Pong. I want them to play for a set amount of time (which I tried to do using Wait and random(3,6)), and then go into the appropriate animation afterwards.

But because they're on loop, I can't use the On Animation Finished event. If I use the Is Playing event, it seems to go into some kind of logic loop (the animations are 'always playing)) and I end up with animation errors. Notably, hyper-headbanging Deer.

I've tried using sub-events, but they will not work for the looping animations. You can also see two other events->actions I put on disabled after testing. They worked fine for the two 'normal' animations as event triggers on them finishing.

Any help would be greatly appreciated!

Edit: Testing with rex's Duration behaviour - http://www.scirra.com/forum/behavior-duration_topic53395.htmlByakko2013-04-07 21:04:33
Create HTML5 games
B
10
S
1
Posts: 27
Reputation: 697

Post » Mon Apr 08, 2013 6:22 am

Boop
Create HTML5 games
B
10
S
1
Posts: 27
Reputation: 697


Return to How do I....?

Who is online

Users browsing this forum: Kagubro, Yahoo [Bot] and 25 guests