Hi, I'm trying to create a spell that takes a photo of a unit.
Basically The Trigger;
Records the units health
waits 6 seconds
Sets the units health to that recorded 6 seconds ago
I've got no problem resetting the health to the correct amount, however. I cant get the floating text to display how much health the unit has lost. Each time it just displays "0.00" So i thought perhaps a negative number and i reversed the math. making it; Life of Target - Previous life. Unfortunately i get the same result.
Does anyone know why?
Basically The Trigger;
Records the units health
waits 6 seconds
Sets the units health to that recorded 6 seconds ago
I've got no problem resetting the health to the correct amount, however. I cant get the floating text to display how much health the unit has lost. Each time it just displays "0.00" So i thought perhaps a negative number and i reversed the math. making it; Life of Target - Previous life. Unfortunately i get the same result.
Does anyone know why?
Trigger:
- Polaroid Cast
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Polaroid Dummy [AoF]
- Actions
- Set PO_Target = (Target unit of ability being cast)
- Set PO_Previous_Life = (Life of PO_Target)
- Wait 6.00 seconds
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- PO_Target Not equal to (Dying unit)
- Then - Actions
- Unit - Set life of PO_Target to PO_Previous_Life
- Special Effect - Create a special effect at (Position of PO_Target) using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- PO_Previous_Life Greater than or equal to (Life of PO_Target)
- Then - Actions
- Floating Text - Create floating text that reads (String((PO_Previous_Life - (Life of PO_Target)))) at (Position of PO_Target) with Z offset 20.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 10.00% transparency
- Wait 2.00 seconds
- Floating Text - Destroy (Last created floating text)
- Else - Actions
- Do nothing
- If - Conditions
- Events