0 Favourites

Locational Damage and Picking

  • 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

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Pick All / Create Bug
56 1,825
Prominent's avatar
Prominent
Unread hot topic
0 Favourites
[Effect] VHS Damage
27 13,350
InvaderXYZ's avatar
InvaderXYZ
Unread hot topic
27 1,536
Azu's avatar
Azu