Same set of triggers/actions - Different Sprites

0 favourites
  • 4 posts
From the Asset Store
This music pack covers differents situations for visual novels, anime games and many more!
  • Hi.

    I've had a bit of a search but can't easily put into words what I am looking for so thought I would ask.

    I'm making a platform shooter. Basic stuff, shoot enemies, enemies take damage and die. Simple enough to code, I have an instance variable on my enemy sprites for health, if the player bullet hits the enemy, it knocks 10 off the health instance variable, if it goes zero or below, destroy the enemy. I have no problems making all that work, but I plan to have a variety of enemy sprites with different behaviors, and I am on the free version so events are at a premium. is there any way to do the damage actions to whatever enemy the player hits?

  • you really need families to do that efficiently. then you just add all your enemies to the family. (but that is in the paid version)

    only other efficient way i can think to do it is have all your enemies in one sprite but on say different animations.

    otherwise you could make a bunch of ORs or a mapped function (is that only on paid?) but these will take up a lot of lines which you dont have.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks man. Families is exactly what I need. Guess it's long past time I got a license anyway

  • Good call, money well spent IMO.

    Give the family all the instance variables (and any behaviors etc) you need for the enemies then just chuck all the enemies into the family and they will inherit them.

    Then run the bullet clash and any other events against against the enemy family instead of individual enemies and construct takes care of the rest. makes life super easy.

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