[Trigger] Damage Percentual

Status
Not open for further replies.
Level 14
Joined
Nov 17, 2020
Messages
194
I have a little problem, i want to make the attacks of a RANGED unit drain a percentual of the life of the target unit, i used the event "a unit is attacked", but that event starts a bit before the attack begins (for example, Thrall attacks a unit but before shooting the projectile the event triggers), so i was wondering how to enable the trigger when the target is damaged by the RANGED unit.
 
You can use a Damage Engine like this one: Damage Engine 5.7.1.2

After copying over the System Folder into your map you would create a trigger like this:
  • Events:
  • Game - DamageEvent becomes Equal to 1.00
  • Conditions:
  • IsDamageRanged Equal to True
  • Unit-Type of DamageEventSource Equal to YourUnitType
  • Actions:
  • Set Variable DamageEventAmount = DamageEventAmount + (Life of DamageEventTarget * 0.05)
I go into more details in this thread -> Damage systems obsolete?
 
You can use a Damage Engine like this one: Damage Engine 5.7.1.2

After copying over the System Folder into your map you would create a trigger like this:
  • Events:
  • Game - DamageEvent becomes Equal to 1.00
  • Conditions:
  • IsDamageRanged Equal to True
  • Unit-Type of DamageEventSource Equal to YourUnitType
  • Actions:
  • Set Variable DamageEventAmount = DamageEventAmount + (Life of DamageEventTarget * 0.05)
I go into more details in this thread -> Damage systems obsolete?
Yoooo thanks a lot, i didn't knew that Damage Engine, it will be very usefull
 
Status
Not open for further replies.
Back
Top