Page 1 of 1
bossfight HP bar half empty, can I fix?
Posted: Fri Oct 24, 2014 12:24 am
by [SMUG]Ipecac
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?
Re: bossfight HP bar half empty, can I fix?
Posted: Fri Oct 24, 2014 2:07 am
by Skuggasveinn
Don't use setHealth to change the hitpoints, use setMaxHealth
Re: bossfight HP bar half empty, can I fix?
Posted: Fri Oct 24, 2014 2:52 am
by mythos
Skuggasveinn wrote:Don't use setHealth to change the hitpoints, use setMaxHealth
Where do I go about putting this function? I too, have this problem.
Re: bossfight HP bar half empty, can I fix?
Posted: Fri Oct 24, 2014 3:03 am
by Skuggasveinn
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
Code: Select all
function setbosshealth()
skeleton_commander_1.monster:setMaxHealth(250)
end
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.
Code: Select all
function startBrothersBossFight()
boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)
boss_fight_brothers.bossfight:activate()
end
hope that helps.
Skuggasveinn.
Re: bossfight HP bar half empty, can I fix?
Posted: Fri Oct 24, 2014 4:23 am
by mythos
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 MaxHealth
Code: Select all
function setbosshealth()
skeleton_commander_1.monster:setMaxHealth(250)
end
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.
Code: Select all
function startBrothersBossFight()
boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)
boss_fight_brothers.bossfight:activate()
end
hope that helps.
Skuggasveinn.
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.
Thanks for all your help!
Re: bossfight HP bar half empty, can I fix?
Posted: Fri Oct 24, 2014 10:57 am
by [SMUG]Ipecac
That's it! Thanks very much man. My wizard is now looking right.