- Joined
- Jul 31, 2009
- Messages
- 89
Alright ill try to explain this as simple as possible..
I have 12 players, when the player creates his hero ill add a custom health bar to that unit like this:
Player unit create event:
Add bar function (Works for player red.. noone else)
This works with other functions so maybe there is a problem with bar code. (I have a variable for every player)
Well my real question is: Is there any better way to do this?
Trigger code becomes really large with a if state for every player.. -.- Help me out please!
I have another smaller question, not so important:
I create a multibar for every player but i cant loop 12 create multibar at the same time.. it only creates 5. So i now have made 3 triggers with 0.5 sec between them to make it work..
I have 12 players, when the player creates his hero ill add a custom health bar to that unit like this:
Player unit create event:
Code:
call AddBarNow(GetTriggerPlayer())
Add bar function (Works for player red.. noone else)
Code:
function AddBarNow takes player pu returns nothing
//! textmacro skill_check_make15 takes nummer
if (GetConvertedPlayerId(pu) == $nummer$) then
set s$nummer$=TTGradBar.create(".", 25, 9, 0, 0, 0)
**More code**
endif
//! endtextmacro
//! runtextmacro skill_check_make15("1")
//! runtextmacro skill_check_make15("2")
//! runtextmacro skill_check_make15("3")
//! runtextmacro skill_check_make15("4")
**etc**
endfunction
This works with other functions so maybe there is a problem with bar code. (I have a variable for every player)
Well my real question is: Is there any better way to do this?
Trigger code becomes really large with a if state for every player.. -.- Help me out please!
I have another smaller question, not so important:
I create a multibar for every player but i cant loop 12 create multibar at the same time.. it only creates 5. So i now have made 3 triggers with 0.5 sec between them to make it work..