13 years
edited 8 years
Sometimes the unit interface needs to be refreshed in order to be displayed correctly.
For example, try to change the xp of an unit like every 0.05 s without refreshing the ui, and with it.
For example, try to change the xp of an unit like every 0.05 s without refreshing the ui, and with it.
1 library RefreshUI2 3 globals4 // just make sure you define an ability which will be never used5 private constant integer DUMMY_ABILITY = 'AImo'
6 endglobals7 8 function RefreshUI takes unit u returns nothing
9 call UnitAddAbility(u,DUMMY_ABILITY)
10 call UnitRemoveAbility(u,DUMMY_ABILITY)
11 endfunction12 13 endlibrary