Issue with platformer/enemy instances

0 favourites
  • 5 posts
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • 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.

    <img src="http://i1267.photobucket.com/albums/jj553/Dominius2010/Stuns.png" border="0" />

  • Updated. Thanks gang!

  • Nothing? =(

    I would've imagined that I was just overlooking some simple solution for this...

  • Nevermind, it was... I split it up creature by creature and it's fine now.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)