Compare two element of the same kind

Get help using Construct 2

Post » Tue Mar 26, 2013 10:57 pm

Hi I have the following event:

> Enemy On collision with Enemy.

and the action should do something, like have the first Enemy turn right, and the second turn left (in this example, when enemies collide, they change direction).

My question is, how do I reference the first enemy and/or the second, in the action "code"?
B
7
S
3
G
3
Posts: 53
Reputation: 2,459

Post » Wed Mar 27, 2013 1:50 am

You could look at addressing their instance IDs (Enemy.IID) and tell the one with the smaller ID to flip 180, and the one with the bigger one to flip 180 as well, perhaps.
Using R238 for all examples
B
60
S
17
G
6
Posts: 363
Reputation: 9,125


Return to How do I....?

Who is online

Users browsing this forum: flemmig, MisterAqua, Nifl and 29 guests