Sooda
Diversity enchants
- Reaction score
- 318
If you ever wondered what will trigger tooltip text refresh then it' s 'unit kills' event. Your unit who' s tooltip you want to update must kill unit. Then game will automatically update all tooltip texts.
It can be useful when you constantly switch ability levels to pass to players info in real time. It could be used mostly for abilities which effects depend on unit' s current state and/ or actions.
Variables used:
"critChance" is integer variable with default starting values.
"tempPoint2" is point variable with default starting values.
"ourGuy" is unit variable with default starting values.
It is taken from my one ability what uses that method to update current unit chance to do Critical Attack. It' s idea how to. Still you have to set values to variables yourself.
EDIT:
I made demo map what shows that method in use. But be careful while using this method because when you start to create too much levels and abilities loading time will be reduced. I hope it makes you first time: "Wow!" when you see it. It looks pretty good too.
It can be useful when you constantly switch ability levels to pass to players info in real time. It could be used mostly for abilities which effects depend on unit' s current state and/ or actions.
Variables used:
"critChance" is integer variable with default starting values.
"tempPoint2" is point variable with default starting values.
"ourGuy" is unit variable with default starting values.
Code:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Set critChance = (critChance + 1)
Unit - Set level of Critical Strike (Active) for ourGuy to critChance
Set tempPoint2 = (Position of ourGuy)
Unit - Create 1 Dummy Unit (Tooltip Updater) for (Owner of ourGuy) at tempPoint2 facing Default building facing degrees
Unit - Cause ourGuy to damage (Last created unit), dealing 1000000000.00 damage of attack type Chaos and damage type Universal
Custom script: call RemoveLocation(udg_tempPoint2)
Else - Actions
EDIT:
I made demo map what shows that method in use. But be careful while using this method because when you start to create too much levels and abilities loading time will be reduced. I hope it makes you first time: "Wow!" when you see it. It looks pretty good too.