So basically what I'm trying to do here is make it so that as a character loses HP they gain access to new skills. For example, a character gets knocked down to half health and now they can use Triple Strike where they couldn't before but if they go above half health they can no longer use Triple Strike. I've found a way to finagle something similar to this by adding skill learning events to Troops with the trigger being the Actor falling below a certain health threshold but the problem is it only applies one way. There doesn't seem to be an option to trigger events when an actor is above a certain hp threshold, only below. Also I'd have to add these events to every single Troop which is fine but inefficient.
MZ Tying Skill use to HP
Game Mechanics DesignMost people use VisuStella plugins, the basic ones are free. Like the VS Skills and States Core where you can use skill notetag:
EDIT: corrected the formula
<JS Skill Visible>visible = user.hp <= user.mhp*0.5;</JS Skill Visible>EDIT: corrected the formula
I think what I'd do for this kind of thing is make an auto passive state that grants the skill. Using my own passive states plugin, that would look something like this:
With VisuStella I think it'd look something like this (untested; I don't use VisuStella):
Code:
<activeif:user.hpRate() < 0.5>
With VisuStella I think it'd look something like this (untested; I don't use VisuStella):
Code:
<JS Passive Condition>
condition = user.hpRate() < 0.5
</JS Passive Condition>
That worked. Thanks.
well
Original thread: https://forums.rpgmakerweb.com/threads/tying-skill-use-to-hp.183534/