This is the visual part of my custom Bounty trigger(s). Tmp_Integer (gold awarded) is calculated elsewhere, then displayed above the Triggering (dying) unit. It then hides the Bounty text for All Players, and then un-hides it for the Killer.
1. I read conflicting info on here about Destroying a Force variable that was set to All Players. This, logically, shouldn't be a problem. But, is it?
2. The error I get in LeakChecker. Why?
Trigger:
- GoldTest
- Events
- Conditions
- Actions
- Floating Text - Create floating text that reads (+ + (String(Tmp_Integer))) above (Triggering unit) with Z offset 0.00, using font size 9.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
- Set Tmp_PG = (All players)
- Floating Text - Hide (Last created floating text) for Tmp_PG
- Custom script: call DestroyForce(udg_Tmp_PG)
- Set Tmp_PG = (Player group((Owner of (Killing unit))))
- Floating Text - Show (Last created floating text) for Tmp_PG
- Custom script: call DestroyForce(udg_Tmp_PG)
- Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 90.00 degrees
- Custom script: call FloatByeText()
JASS:
function FloatByeText takes nothing returns nothing
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 2.00 )
call SetTextTagFadepointBJ( GetLastCreatedTextTag(), 1.50 )
endfunction
1. I read conflicting info on here about Destroying a Force variable that was set to All Players. This, logically, shouldn't be a problem. But, is it?
2. The error I get in LeakChecker. Why?
Code:
(Line: 9) (Word: 3) Player Group Leak
Set Tmp_PG = (Player group((Owner of (Killing unit))))
Set Tmp_PG = ^Leak
(Suggested Fix) No suggested fixes.