How do I determine the type of object within a family?

Get help using Construct 2

Post » Wed Apr 30, 2014 12:39 pm

I created a family that contains 5 different enemy sprite objects. I have a ForEach loop of that Family and I would like to determine on each iteration the type of the enemy. Is there anyway to do this?
B
5
S
1
Posts: 24
Reputation: 423

Post » Wed Apr 30, 2014 12:59 pm

you could set a variable "type" to the familly, and set every object A to type=1, object B to type=2, and so on.

then you can do this:
eg:
"family type=2" ----> and only objects with type=2 would be called.
Just be sure to set the proper numbers to the objects. if they are already in the layout on start, you can set them manually, but on creating them you'll need to "set type to X".
B
43
S
12
G
6
Posts: 446
Reputation: 6,807

Post » Wed Apr 30, 2014 1:24 pm

Thanks Sargas.
B
5
S
1
Posts: 24
Reputation: 423


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests