Locational Damage and Picking

0 favourites
  • 5 posts
From the Asset Store
This sound pack features 117 game sounds : Axe,Punch Swing & Hit & Damage. This is a perfect collection for your game.
  • So what I want is relatively simple:

    When bullets collide with enemies, damage the enemy

    When bullets collide with enemy head, damage the enemy more

    The "heads" are invisible hitboxes in the same container as the enemies. I have it working for one type of enemy and type of bullet, but I have many types of bullet and enemies so I need to work with families. I've tried this:

    But this won't pick the enemy in the container with the head that is collided with, so all enemies are damaged.

    How do I make it pick the right enemy.

    Edit: I'm putting the word "headshot" here so it might help people find this thread in the future

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might consider using a variable to store the "Enemy" UID to which your Enemy_Head is linked. I don't think containers work really well with families.

  • What does the variable Action do when set to "Hurt" ?

    Why not handle the condition on different state like "Hurt_little" and "Hurt_more", so they execute properly.

    I suggest you set the damage at first priority before other actions taking place.

  • Magistross: Oh right, that would work. Since I learned about container, they seem the go-to option for this sort of thing but I'm beginning to see that they have a lot limitations. Thanks for the help.

    alextro: It prevents the enemy from performing actions like moving or shooting and plays an animation. Why would this cause a problem?

    Why would damage need to go first.

  • Just in case to make sure the "Hurt" state doesn't prevent other actions to occur & make things are executed in right order.

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