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
Hey guys I'm new here, am having some trouble with the correct use of 'for each' and unsure if it is what I am after.
Basically I have multiple enemies on the screen at once that share behaviour patterns (every random X seconds, jump, idle etc), and although I've used the For Each condition on top of the commands either just one enemy does this or all enemies on screen still jump, run, remain idle at the same moments. Is there a simple work around I am missing? I need the enemies to independently carry out the random commands.
Develop games in your browser. Powerful, performant & highly capable.
Maybe you can test these:
1. set different value "random(1,3)" for each enemy, then set enemy jump when value=1, idle when value=2, and so on.
2. every random X seconds, pick a random enemy, and then set it to jump, idle, etc.
Hope these be helpful.
Thankyou, I will have to give that a try!