- Joined
- Mar 13, 2008
- Messages
- 126
i wanted to make a trigger that would "toss" a mana cost of ability being cast over the casting unit. it works but sometimes gives something like manacost-1 or negative values...i have tested it with 3 different spells that are insta-cast and i have rapidly fired them...
-
Mana Cost Show
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-

Actions
-


Custom script: local unit udg_Caster
-


Set Caster = (Triggering unit)
-


Set Mana_Cost_Before = (Mana of Caster)
-


Wait 0.00 seconds
-


Set Mana_Cost_After = (Mana of Caster)
-


Set Mana_Cost = ((Integer(Mana_Cost_Before)) - (Integer(Mana_Cost_After)))
-


Floating Text - Create floating text that reads (String(Mana_Cost)) above Caster with Z offset 7.00, using font size 10.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
-


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


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


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


Set Caster = No unit
-
-


