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 was making some animations and made a condition for it that was:
if(play_death_animation == true)
play appropriate death animation
However, nothing in that else was being done (and adding a simple event to the top of it didn't affect anything either. I had to invert the original if and then stick the nested ones inside of it to make it work and I thought that was mighty strange and made little sense. Explanation for it?
Develop games in your browser. Powerful, performant & highly capable.
When an else event has subevents it will not function, it is a know bug and is on the bug tracker.
You can often avoid using sub-events with just several else statements in line, each grouped with another condition. Works just like if-elif-else conditionals, and has worked fine for me in Construct. Something like this should work:
+ if(play_death_animation == true)
-> play appropriate death animation
+ if walking
-> walking animation
+ if jumping
-> jumping animation
+ if falling
-> falling animation
-> idle animation[/code:2jd4j6v1]
After much debugging I worked out what causes the else condition to bugger up when its nesting. It should be fixed for the next version
Great to hear, David! That will make a big difference to many users, I'm sure.
Thank you so much David!