So I'm trying to figure out how to add a 'Berserk'-like state to a specific Actor when she falls below a certain HP Threshold. I really just want to implement it like this:
if (actor.getHp / actor.getMaxHp < .51) {
actor.addState(Berserk)
} else if (actor.getHp / actor.getMaxHp < .21){
actor.removeState(Berserk)
actor.addState(Super-Berserk)
}
I'm still new to MV so I don't know what the best way to go about this would be. I'd rather not use plugins, but I'm not opposed to it if it's the best way to do it.
if (actor.getHp / actor.getMaxHp < .51) {
actor.addState(Berserk)
} else if (actor.getHp / actor.getMaxHp < .21){
actor.removeState(Berserk)
actor.addState(Super-Berserk)
}
I'm still new to MV so I don't know what the best way to go about this would be. I'd rather not use plugins, but I'm not opposed to it if it's the best way to do it.