If I use setMaxHealth and I use it before I connect the skeleton_commader to the bossfight entity, I have a correct bossfight health bar even if he only has 5 in health.
so setMaxHealth seems to change the base health and not just set the health to a value.
Code: Select all
function startBrothersBossFight()
skeleton_commander_1.monster:setMaxHealth(5)
boss_fight_brothers.bossfight:addMonster(skeleton_commander_1.monster)
boss_fight_brothers.bossfight:activate()
end