Author Topic: Check if War3_DealDamage is fatal  (Read 441 times)

abgar

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Check if War3_DealDamage is fatal
« on: December 22, 2015, 12:53:23 AM »
Hi guys,

Was wondering if there's a simple check that to use to see if a War3_DealDamage event is fatal?

The reason basically being that i can say "If War3_DealDamage(client,10,target,...) is fatal, then do something else.  If NOT fatal, then DON"T do something else...

Is there an in-built function that i can use to check this?

Cheers :)

Ownz

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2437
  • chmod -R 777 *
    • View Profile
    • OwnageClan
Re: Check if War3_DealDamage is fatal
« Reply #1 on: December 22, 2015, 11:31:06 PM »
no, as you can't predict if damage is reduced or canceled

you can fake it by checking the player health, and assume they will take 100% of the damage, and force a killing blow

abgar

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Re: Check if War3_DealDamage is fatal
« Reply #2 on: December 23, 2015, 12:23:44 AM »
Ah bugger.  Thanks anyway Ownz,

I might try to check entity health before, and then subtract the damage amount - if new damage amount <=0, then do XX...

Cheers for the suggestion :)