Try to keep it as simple as you can, how can i make a unit health bar that update when changed? Or how can i for example update a label with the unit life in numbers?
I'm very new to dialogs and just need some basic knowledge how to go on.
This will lag your game pretty bad though, for health I suggest boss bars. They work the same and take MUCH less effort both for you and your map.
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
It's the event. If your unit has regeneration, it fires 16x per second (Not including any events that occur if your unit is getting damaged x times per second). Any subsequent actions cause it to start lagging like mad. It's better to have a while loop that checks the health of the unit every x seconds, as it doesn't place an event in the processing stack.
Like Fuzzy said, but also, the reason I didn't put a while loop or "wait 1.0 game time seconds" is to simulate a boss bar, more or less. Having a wait can get a little confusing especially for units with a health regen of 1.1+ and I could never figure out a way to simulate the actual regeneration better than a wait of 1 seconds.
Rollback Post to RevisionRollBack
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
Thanks to your post i have come a long way with dialogs :)
I now have made dialogs that show all players current minerals and vespene gas.
I'm however a bit stuck, when a player leave i want to remove the current dialog and reconstruct it but i dont know how to remove it to start over. Any tips on how to remove teeh old dialog and all its content?
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
Try to keep it as simple as you can, how can i make a unit health bar that update when changed? Or how can i for example update a label with the unit life in numbers?
I'm very new to dialogs and just need some basic knowledge how to go on.
@Sherlia: Go
If you must have a dialog for health, do something along the lines of:
These are the variables, now time for the creation trigger:
And now the loop trigger:
This will lag your game pretty bad though, for health I suggest boss bars. They work the same and take MUCH less effort both for you and your map.
@Yaksmanofage: Go
Shameless advertising
Because the vanilla boss bars are extremely rigid.
Unit - Unit Life changes
Is it the event it self that make the game lag or the actual action?
@Sherlia: Go
It's the event. If your unit has regeneration, it fires 16x per second (Not including any events that occur if your unit is getting damaged x times per second). Any subsequent actions cause it to start lagging like mad. It's better to have a while loop that checks the health of the unit every x seconds, as it doesn't place an event in the processing stack.
@FuzzYD: Go
A+!
I was wondering if there were mods for boss bars, then I realized I was too lazy. :(
@Sherlia: Go
Like Fuzzy said, but also, the reason I didn't put a while loop or "wait 1.0 game time seconds" is to simulate a boss bar, more or less. Having a wait can get a little confusing especially for units with a health regen of 1.1+ and I could never figure out a way to simulate the actual regeneration better than a wait of 1 seconds.
Thanks to your post i have come a long way with dialogs :)
I now have made dialogs that show all players current minerals and vespene gas.
I'm however a bit stuck, when a player leave i want to remove the current dialog and reconstruct it but i dont know how to remove it to start over. Any tips on how to remove teeh old dialog and all its content?
@Sherlia: Go
Then do like you did before.
It's not a problem. I am glad to help anyone who needs my help when I can. :)
Yes thanks again. I'm all into making dialogs now, lol :P