Hey guys,
I have a bossfight with a wizard, and it's HP is reduced to 500hp to make it possible at lower levels. His HP bar shows 500/1500hp at the start, can I make the HP bar look right?
bossfight HP bar half empty, can I fix?
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: bossfight HP bar half empty, can I fix?
Don't use setHealth to change the hitpoints, use setMaxHealth
Re: bossfight HP bar half empty, can I fix?
Where do I go about putting this function? I too, have this problem.Skuggasveinn wrote:Don't use setHealth to change the hitpoints, use setMaxHealth
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: bossfight HP bar half empty, can I fix?
lets say you are going to use skeleton_commander is your boss, before you start the fight, or when you spawn your boss (if you are spawning him with a script) change the MaxHealth
Then when you are starting the boss fight you add your skeleton_commander to the boss fight.
When you add him here he will have MaxHealth of 250 and the bar will be full.
hope that helps.
Skuggasveinn.
Code: Select all
function setbosshealth()
skeleton_commander_1.monster:setMaxHealth(250)
end
When you add him here he will have MaxHealth of 250 and the bar will be full.
Code: Select all
function startBrothersBossFight()
boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)
boss_fight_brothers.bossfight:activate()
end
Skuggasveinn.
Re: bossfight HP bar half empty, can I fix?
I have this setup correctly, as I can see his hp increase a bit when I step over the trigger that triggers the boss and runs the script. It still shows a lot of missing HP if I adjust the monsters level to 5. It seems like monster level is overriding the maxhp and the bar is still partially empty.Skuggasveinn wrote:lets say you are going to use skeleton_commander is your boss, before you start the fight, or when you spawn your boss (if you are spawning him with a script) change the MaxHealthThen when you are starting the boss fight you add your skeleton_commander to the boss fight.Code: Select all
function setbosshealth() skeleton_commander_1.monster:setMaxHealth(250) end
When you add him here he will have MaxHealth of 250 and the bar will be full.
hope that helps.Code: Select all
function startBrothersBossFight() boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster) boss_fight_brothers.bossfight:activate() end
Skuggasveinn.
Thanks for all your help!
-
- Posts: 28
- Joined: Tue Oct 21, 2014 5:51 am
Re: bossfight HP bar half empty, can I fix?
That's it! Thanks very much man. My wizard is now looking right.