- Joined
- May 22, 2009
- Messages
- 491
How do I get it where a little number pops up next to a unit (any unit) showing how much damage they did?
Also, where is the call DestroyGroup thing? (Sorry Im not great with triggers :/)
First you use Integer to String.There is no Conversion - Real to Integer all i have is
One problem xD sorry but the numbers just sit there and the numbers are all weird the first hit is always 315 and then numbers never disappear I'll get a picture.
Here you go:
Initialization
Events
Map initialization
Conditions
Actions
Set TempGroup = (Units in (Entire map))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Trigger - Add to Execute <gen> the event (Unit - (Picked unit) Takes damage)
Custom script: call DestroyGroup(udg_TempGroup)
New Units
Events
Unit - A unit enters (Entire map)
Conditions
Actions
Trigger - Add to Execute <gen> the event (Unit - (Entering unit) Takes damage)
Basically, first trigger picks all units placed in map into damage detection. All new units will be added with second one and third shows damage they have taken.
Execute
Events
Conditions
Actions
Set DamageString = (String((Integer((Damage taken)))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Triggering unit)) Greater than 0.00
Then - Actions
Floating Text - Create floating text that reads DamageString above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Else - Actions
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 256.00 towards 90.00 degrees
Floating Text - Change the fading age of (Last created floating text) to 0.80 seconds
Floating Text - Change the lifespan of (Last created floating text) to 1.20 seconds
i might also use this trigger any variables i need to put?
All strings leak, but they can't be prevented. I don't really know how and why, but it's what I've been told by every fancy Jasser there is.Isnt DamageString a leak?