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!