Randomized idle animations?

Get help using Construct 2

Post » Wed Jan 25, 2012 6:27 pm

Hello!

I was wondering if it is possible to have multiple idle animations that can be triggered after a few seconds of being idle?

Me and my friend are very new to Construct, and the whole game development team, and random idle animations are always nice to see in games.

We have a default standing animation, and another idle animation where our character is looking around the screen tapping his foot. There both GIFS.

If anyone has any advice, or tips to help us, it would be greatly appreciated :)

Thanks!
B
2
Posts: 8
Reputation: 391

Post » Wed Jan 25, 2012 8:57 pm

Sure is possible.
You could name each animation idleN with n being 1,2,3,etc.
then when you want to set the animation, use the action
set animation to idle&ceil(random(whatever)). The ceil makes it an integer
and the & just converts the number value into a string.

Hopefully that helps! Welcome to C2 ;)
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Jan 25, 2012 11:00 pm

Dude, thankyou! This has had me frustrated for about two hours :)

Thankyou :D
B
2
Posts: 8
Reputation: 391

Post » Thu Jan 26, 2012 12:15 am

For reference Weishaupt recently wrote a tutorial on the subject.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791


Return to How do I....?

Who is online

Users browsing this forum: Braus, Yura G and 16 guests