Charapanga
New Member
- Reaction score
- 46
How do i display the damage dealt using floating text over units taking damage, for damage taken from both spells and atacks?
Events
UnitX takes damage
Conditions
Actions
Floating Text - Create floating text above unit that reads (String((Damage Taken))) above unit, blah blah.
DamageShow1
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Set AllUnits = (Units in (Playable map area))
Unit Group - Pick every unit in AllUnits and do (Actions)
Loop - Actions
Trigger - Add to DamageShow3 <gen> the event (Unit - (Picked unit) Is attacked)
Custom script: call DestroyGroup(udg_AllUnits)
Custom script: call DestroyTrigger(GetTriggeringTrigger())
DamageShow2
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Trigger - Add to DamageShow3 <gen> the event (Unit - (Entering unit) Takes damage)
DamageShow3
Events
Conditions
Actions
Set FloatingTextPoint = (Position of (Triggering unit))
Floating Text - Create floating text that reads ((String((Integer((Damage taken))))) + !) at FloatingTextPoint with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
Custom script: call RemoveLocation(udg_FloatingTextPoint)
Unit Group - Pick every unit in AllUnits and do (Actions)
Loop - Actions
Trigger - Add to DamageShow3 <gen> the event (Unit - (Picked unit) Is attacked)
Unit Group - Pick every unit in AllUnits and do (Actions)
Loop - Actions
Trigger - Add to DamageShow3 <gen> the event (Unit - (Picked unit) Takes damage)
Problem:
Code:Unit Group - Pick every unit in AllUnits and do (Actions) Loop - Actions Trigger - Add to DamageShow3 <gen> the event (Unit - (Picked unit) Is attacked)
chagne to:
Code:Unit Group - Pick every unit in AllUnits and do (Actions) Loop - Actions Trigger - Add to DamageShow3 <gen> the event (Unit - (Picked unit) Takes damage)
Show Damages
Events
Unit - A unit Is attacked
Conditions
(Integer((Damage taken))) Greater than 0
Actions
Floating Text - Create floating text that reads ((String((Integer((Damage taken))))) + !) at (Position of (Triggering unit)) with Z offset 0.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
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 - Change the fading age of (Last created floating text) to 1.00 seconds
Show Damages
Events
Unit - A unit Is attacked
Conditions
(Integer((Damage taken))) Greater than 0
Actions
[B]Set Temploc = Position of (Triggering unit)[/B]
Floating Text - Create floating text that reads ((String((Integer((Damage taken))))) + !) at [B]Temploc[/B] with Z offset 0.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
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 - Change the fading age of (Last created floating text) to 1.00 seconds
[B]Custom Script: call RemoveLocation(udg_Temploc)[/B]