Multiple enemy behaviour problem

Get help using Construct 2

Post » Tue Oct 22, 2013 7:17 am

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.
B
7
S
2
Posts: 24
Reputation: 569

Post » Tue Oct 22, 2013 8:03 am

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.
B
10
S
2
G
2
Posts: 31
Reputation: 2,129

Post » Tue Oct 22, 2013 8:22 am

Thankyou, I will have to give that a try!
B
7
S
2
Posts: 24
Reputation: 569


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, senecaa and 17 guests