Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I have a butterfly animation 1 is orange butterfly flying animation 2 is yellow butterfly flying animation three is purple butterfly flying animation I want to do this Event(On start of the layout) Action(Pick random animation) How do I do it?
Develop games in your browser. Powerful, performant & highly capable.
Choose works very well.
You can also do it by randomizing a variable and depending on the variable value play an animation.
Ie. butterflyVAR=random(0,10) (number of animations) then set each animation to a number butterflyVAR=1 play animation1, etc.
You could use an arrays if you had lots of butterflies.
For what your describing choose is probably best.
Another way is to build a string with expressions:
Animation to play: "animationName"&int(random(1,200))
substitute the 200 with the total amount of animations.
jojoe — I can't find choose?
You can find more on choose here :
Rather than putting the animation name in the play animation action you would use one of the Choose or random expressions.
Hope that helps.
You will find that unlike many software manuals, Construct2's manual is your friend. It is very comprehensive!