Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Floating Text - Create floating text that reads (String((Integer((Mana of (Triggering unit))))) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100%, 100%, 100%) and 0.00% transparency
(Position of (Triggering unit)) leaks. Try setting it to a point variable and destroy it when it is no longer needed via Custom Script.
JASS:
call RemoveLocation(yourVar)
yourVar represents the variable you are using which is pointing to that point object.
If created in GUI, add a "udg_" prefix, without quotes.
Floating Text - Create floating text that reads (String((Integer((Mana of (Triggering unit))))) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100%, 100%, 100%) and 0.00% transparency
(Position of (Triggering unit)) leaks. Try setting it to a point variable and destroy it when it is no longer needed via Custom Script.
JASS:
call RemoveLocation(yourVar)
yourVar represents the variable you are using which is pointing to that point object.
If created in GUI, add a "udg_" prefix, without quotes.
Thanks, I guess it'll have to leak since I do not think I can work around it. Since I want the player to see the message.
I cannot foresee where the player is going to be, so if I set the location to be X, the player might be at Y.
Correct me if I'm wrong but I cannot see a way to make it work, leak-free.
Thanks, I guess it'll have to leak since I do not think I can work around it. Since I want the player to see the message.
I cannot foresee where the player is going to be, so if I set the location to be X, the player might be at Y.
Correct me if I'm wrong but I cannot see a way to make it work, leak-free.
Create a variable, set the value of the Point variable to the position of the triggering unit, then replace that clause in your Floating Text - Create action with the variable. After you create it, call the RemoveLocation function as MyPad stated.
If you didn't get it from above explanation, here's a visual one:
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Equal to Pig
(Unit-type of (Triggering unit)) Equal to Sheep
Actions
Set TempPoint = (Position of (Triggering unit))
Floating Text - Create floating text that reads (String((Mana of (Triggering unit)))) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Custom script: call RemoveLocation(udg_TempPoint)
Player - Add (Integer((Mana of (Triggering unit)))) to (Owner of (Triggering unit)) Current gold
If you didn't get it from above explanation, here's a visual one:
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Equal to Pig
(Unit-type of (Triggering unit)) Equal to Sheep
Actions
Set TempPoint = (Position of (Triggering unit))
Floating Text - Create floating text that reads (String((Mana of (Triggering unit)))) at TempPoint with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
Custom script: call RemoveLocation(udg_TempPoint)
Player - Add (Integer((Mana of (Triggering unit)))) to (Owner of (Triggering unit)) Current gold
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.