- Joined
- Jun 27, 2010
- Messages
- 3,253
I'm trying to create healing floating text! Here is my trigger. For now, the result is - it shows some unrealistic numbers, like +340,350,364, 240 etc, even if the unit is not healing.
Where am I wrong here?
Where am I wrong here?
-
Healing Detection
-

Events
-


Time - Every 0.25 seconds of game time
-
-

Conditions
-

Actions
-


Set HP_Counter = (Units in (Playable map area) matching ((Owner of (Matching unit)) Not equal to Neutral Passive))
-


Unit Group - Pick every unit in HP_Counter and do (Actions)
-



Loop - Actions
-




Set HP_New[(Player number of (Owner of (Picked unit)))] = (Life of (Picked unit))
-




Set HP_Result[(Player number of (Owner of (Picked unit)))] = (HP_New[(Player number of (Owner of (Picked unit)))] - HP_Old[(Player number of (Owner of (Picked unit)))])
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






HP_New[(Player number of (Owner of (Picked unit)))] Greater than or equal to 2.10
-
-





Then - Actions
-






Floating Text - Create floating text that reads (+ + (String((Integer(HP_Result[(Player number of (Owner of (Picked unit)))]))))) above (Picked unit) with Z offset 40.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
-






Floating Text - Hide (Last created floating text) for (All players)
-






Floating Text - Change (Last created floating text): Disable permanence
-






Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
-






Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
-






Floating Text - Show (Last created floating text) for (Player group((Owner of (Picked unit))))
-
-





Else - Actions
-
-




Set HP_Old[(Player number of (Owner of (Picked unit)))] = (Life of (Picked unit))
-
-
-


Custom script: call DestroyGroup(udg_HP_Counter)
-
-









