Storing damage dealt in a variable

bugbear

New Member
Reaction score
3
What would a trigger look like if i wanted to store how much damage a unit dealt with a normal attack into a variable.

For example: My footman swings at a priest, he deals 10 damage. This damage is then stored into my X variable.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
You'd have to use a "is attacked" trigger.
Store the life of the unit into a variable.

Add "unit takes damage" to another trigger.
Store the units life into another variable in the takes damage trigger.

Minus the second variable from the first;
You have the damage taken.

This is somewhat unreliable however as the unit can take more damage between "being attacked" and taking the damage (ie. if the attacking unit is ranged) .
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top