How do I make enemy died in 2 or 3 hit

  • Hello again sorry for asking too many question

    How can i make an enemy died after i shot 2 of my arrow or on 2 hit... i can make the enemy died in 1 hit and i thinks that too easy. I found a similar things that i want to do but i have no idea how to put the event....can someone tell me.

    Link to other forum that have a similar things to what i want:

    trying-to-make-a-two-hit-kill-enemy_t109855

    Link to what my current games look like:

    youtube.com/watch ... e=youtu.be

    Link to photo of event sheet and layout:

    imgur.com/a/Xcv7GtY

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Add a variable to your zombie called "health" (or really anything that helps you know what it's for). Set it to a value (we'll use 100 in this example).

    On arrow collides with zombie: call function "Arrow_hit_zombie" (Set parameter 0 to the zombie's UID, and parameter 1 to the arrow's UID)

    On function "Arrow_hit_zombie"

    --->zombie (choose by UID (function.param(0)) -> set health to clamp(self.health-50,0,100)

    ----> Arrow (choose by UID (function.param(1)) -> Destroy

    Zombie health = 0 --> destroy/set death animation

  • Add a variable to your zombie called "health" (or really anything that helps you know what it's for). Set it to a value (we'll use 100 in this example).

    On arrow collides with zombie: call function "Arrow_hit_zombie" (Set parameter 0 to the zombie's UID, and parameter 1 to the arrow's UID)

    On function "Arrow_hit_zombie"

    --->zombie (choose by UID (function.param(0)) -> set health to clamp(self.health-50,0,100)

    ----> Arrow (choose by UID (function.param(1)) -> Destroy

    Zombie health = 0 --> destroy/set death animation

    Thx mate i will let you know if it works or not :3

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