Ginger Root's Recent Forum Activity

  • Hi, I wanna have only a specific instance of an enemy object destroyed when the player attacks it (obviously, only the instance that was attacked). When I attack, every instance of my enemy is destroyed. The same applies when I have the enemy touch an object that makes it jump (all instances of the enemy jump, even the ones that didn't touch the object). Thanks in advance for any help

  • Any tutorials on containers? I'm not sure at all what that is. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Basically I have a hit box for my enemy and a separate sprite whose position is set to that box on every tick to represent it (I'm under the impression that it's better practice to do this for collision than to use the actual sprite).

    So, when the enemy is attacked, I switch an instance variable ("dead") from 0 to 1. Then I have a separate event that runs when the dead variable is 1 (true) to animate the enemy exploding and that destroys both the enemy hit box and the sprite that represents it.

    The problem is when I have multiple instances of the enemy, if one of them is attacked, all of them are triggered to die. Do I need separate variables for every instance? How do I do this without creating a big series of events for every single instance of an enemy? Should I not even be using a variable?

    Thanks in advance for any help!

Ginger Root's avatar

Ginger Root

Member since 8 Jan, 2014

None one is following Ginger Root yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies