Help managing multiple instances

Get help using Construct 2

Post » Mon Nov 28, 2011 5:27 am

Alright, so I have two instances of an enemy. They patrol around their set paths, and after a random amount of seconds in a specified range, they stop moving; then, after another random amount of seconds in another specified range, they start moving again.

The problem is getting them to move separately. Without any additions to the basic formula, they'll stop and start at the same time, which I don't want. If you add in a "For Each Enemy" condition in the two events that make them start/stop, they do start/stop separately... but things start getting weird. One will start jittering because he's constantly starting and stopping, one of them might stop and never start again... It's just a mess.

http://db.tt/axLp8Fc3

Anyone care to take a look? I simplified it as much as possible.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Mon Nov 28, 2011 6:42 am

Try using a variable as a countdown. Two events and you're done.
http://dl.dropbox.com/u/5426011/examples%208/sully.capx
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Mon Nov 28, 2011 6:48 am

That works perfectly! It occurred to me to try variables, but I was so determined to use the dang Wait action. Thanks a million R0J0, you're a lifesaver as always.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112


Return to How do I....?

Who is online

Users browsing this forum: Donald Cela, Kagubro and 27 guests