Issue with platformer/enemy instances

Get help using Construct 2

Post » Sun Jun 09, 2013 5:32 am

Alright, so here's what I got.

I'm currently just testing the waters for a platformer I want to make, so I'm just creating a test room where I spawn a bunch of enemies to test out my class balancing.

My issue is this. I get a spawn point to create 4 "Dog" sprites one after another. The character I have has a stun ability that should only be stunning the monster it hits. To do this, I created a "Stunned" instance variable for my "Mobs" family, and said "On collision w/ hitbox for this ability, stunned = 1.

I have a line in the events that says Mobs if stunned = 1, platform speed = 0.

Unfortunately when my character hits ONE enemy, he stuns THE WHOLE FAMILY. I tried reading it as "For Each Mobs" to just do the one it hits, but it doesn't seem to be helping...

Any advice? I'll edit with code in just a minute here.

Dominius20032013-06-09 05:40:38
B
10
S
2
Posts: 20
Reputation: 1,142

Post » Sun Jun 09, 2013 5:40 am

Updated. Thanks gang!
B
10
S
2
Posts: 20
Reputation: 1,142

Post » Sun Jun 09, 2013 2:52 pm

Nothing? =(

I would've imagined that I was just overlooking some simple solution for this...
B
10
S
2
Posts: 20
Reputation: 1,142

Post » Sun Jun 09, 2013 3:09 pm

Nevermind, it was... I split it up creature by creature and it's fine now.
B
10
S
2
Posts: 20
Reputation: 1,142

Post » Sun Jun 09, 2013 3:31 pm

Yeah picking Mobs with a condition doesn't pick Dogs/Bats/etc.

You can have:
Mobs: Stunned = 1 -> Mobs: Stop moving
or
Dog: Stunned = 1 -> Dog: Stop moving
but not
Mobs: Stunned = 1 -> Dog: Stop moving
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,620


Return to How do I....?

Who is online

Users browsing this forum: Hiddendanger, Lordshiva1948, radhaw and 1 guest