Ok so I have a boss bar set to the main base in my map showing its max HP. I have a Real set for the max HP of the base so I can modify it per difficulty.
Everything was working fine with the boss bar, it was staying in synch and moving up and down as it was repaired / damaged.
Now I have added an abilty on the base to restore power and shields to it. When power is restored the energy ticks up, and shields restored shields tick up. These work fine and do only what they are supposed to do, however the boss bar ticks up in value when the shields are enabled as well. I have checked and the value of the base does NOT change while this is happening.
So the energy ticks up, shields tick up and HP doesn't change, but the boss bar tied to the HP of the ship increases once the shields tick up.
Unit - Set (Unit 1 from Ship unit group) Maximum Life to Ship Life
Unit - Set (Unit 1 from Ship unit group) Life to (Ship Life * 0.1)
UI - Display boss bar 3 with title "Ship status", portrait Assets\Textures\sm_dropship01_blue_diff.dds and maximum value (Integer(Ship Life)) for (All players)
UI - Set boss bar 3 boss to (Unit 1 from Ship unit group) (Do refresh the boss bar)
is the trigger I use to set the life of the base to the new max value and the current value as well as to make the boss bar.
When I made the shields and energy abilties the trigger did not change at all, and was extensivly tested before I made these abilities.
Any ideas from anyone would be appreciated.
Solved it after having a good think about it and a play.
For those who were wondering what was happening was the boss bar was adding the life and shields together and displaying both as its current and maximum value. This was caused by the UI - Set boss bar 3 boss to (Unit 1 from Ship unit group) (Do refresh the boss bar) action.
I had to use a different action and also put this action in my scoreboard trigger which was always happening once every second. To make it smooth I had to decrease the time of the trigger from every second to every 0.5 seconds or it caused a huge disparaging gap in the health modification.
UI - Display boss bar 3 with title "Ship status", portrait Assets\Textures\sm_dropship01_blue_diff.dds and maximum value (Integer(((Unit 1 from Ship unit group) Maximum Life (Current)))) for (All players)
UI - Set boss bar 3 current value to (Integer(((Unit 1 from Ship unit group) Life (Current)))) (Do refresh the boss bar)
The action I had to set to the scoreboard was
UI - Set boss bar 3 current value to (Integer(((Unit 1 from Ship unit group) Life (Current)))) (Do refresh the boss bar)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ok so I have a boss bar set to the main base in my map showing its max HP. I have a Real set for the max HP of the base so I can modify it per difficulty.
Everything was working fine with the boss bar, it was staying in synch and moving up and down as it was repaired / damaged.
Now I have added an abilty on the base to restore power and shields to it. When power is restored the energy ticks up, and shields restored shields tick up. These work fine and do only what they are supposed to do, however the boss bar ticks up in value when the shields are enabled as well. I have checked and the value of the base does NOT change while this is happening.
So the energy ticks up, shields tick up and HP doesn't change, but the boss bar tied to the HP of the ship increases once the shields tick up.
Unit - Set (Unit 1 from Ship unit group) Maximum Life to Ship Life
Unit - Set (Unit 1 from Ship unit group) Life to (Ship Life * 0.1)
UI - Display boss bar 3 with title "Ship status", portrait Assets\Textures\sm_dropship01_blue_diff.dds and maximum value (Integer(Ship Life)) for (All players)
UI - Set boss bar 3 boss to (Unit 1 from Ship unit group) (Do refresh the boss bar)
is the trigger I use to set the life of the base to the new max value and the current value as well as to make the boss bar.
When I made the shields and energy abilties the trigger did not change at all, and was extensivly tested before I made these abilities.
Any ideas from anyone would be appreciated.
Solved it after having a good think about it and a play.
For those who were wondering what was happening was the boss bar was adding the life and shields together and displaying both as its current and maximum value. This was caused by the UI - Set boss bar 3 boss to (Unit 1 from Ship unit group) (Do refresh the boss bar) action.
I had to use a different action and also put this action in my scoreboard trigger which was always happening once every second. To make it smooth I had to decrease the time of the trigger from every second to every 0.5 seconds or it caused a huge disparaging gap in the health modification.
UI - Display boss bar 3 with title "Ship status", portrait Assets\Textures\sm_dropship01_blue_diff.dds and maximum value (Integer(((Unit 1 from Ship unit group) Maximum Life (Current)))) for (All players)
UI - Set boss bar 3 current value to (Integer(((Unit 1 from Ship unit group) Life (Current)))) (Do refresh the boss bar)
The action I had to set to the scoreboard was
UI - Set boss bar 3 current value to (Integer(((Unit 1 from Ship unit group) Life (Current)))) (Do refresh the boss bar)