How would I implement this? I'm making a character that's supposed to have a state activate as soon as he gets to less than 30% of his maximum health. I haven't really seen any scripts out there that work like this. Can I get any help on trying to do this?
States that only activate after a certain HP threshold
RPG Maker VXAce SupportUse a troop event - those can be conditioned to the HP of either the actors or the enemies.
if you need this outside of battle, then either make a check on whatever event damages the actor, or on a parallel process.
Use control variable : game data to load the current and maximum HP into variabes to check.
if you need this outside of battle, then either make a check on whatever event damages the actor, or on a parallel process.
Use control variable : game data to load the current and maximum HP into variabes to check.
The specific thing I'm trying to do is that if he gets below that certain HP at any point in time either in battle and not, he gains the status. I'm thinking of trying to get a script to do this, but I'm not sure how it would work.
I understood that, and that was exactly what my answer above was for.
absolutely no script neccessary.
which part of my answer above do you have questions for?
absolutely no script neccessary.
which part of my answer above do you have questions for?
The thing is, I don't really feel like using troop events or a parallel process. I generally don't like using those and they feel clunky to me. Are there other ways I could do it?
I don't have enough time to look into it properly, but could Hime's Passive Conditional States script help you?
@sillything every tool has its advantage and disadvantage, that is especially true for parallel processes.
But that is one of the primary function of troop events, to react when someone is damaged enough.
As for the parallel - it is only absolutely needed if you are using un-evented damages (either damage tile or negative regeneration states), because if every damage on map is evented you can simply add the check after the damage command to the event.
and while a badly designed parallel can cause lag, there are ways to handle such checks correctly.
forcing the use of PP's at the wrong places is as bad as denying their use for no specific reason.
because if something is always bad it would not be added in an engine as long-going as the RPG Makers.
But that is one of the primary function of troop events, to react when someone is damaged enough.
As for the parallel - it is only absolutely needed if you are using un-evented damages (either damage tile or negative regeneration states), because if every damage on map is evented you can simply add the check after the damage command to the event.
and while a badly designed parallel can cause lag, there are ways to handle such checks correctly.
forcing the use of PP's at the wrong places is as bad as denying their use for no specific reason.
because if something is always bad it would not be added in an engine as long-going as the RPG Makers.
Original thread: https://forums.rpgmakerweb.com/threads/states-that-only-activate-after-a-certain-hp-threshold.176687/