MV prevent knockout + add 1 hp if affected?

hi! as my post history suggests i have a QTE mechanic in my game where the player can either successfully or unsuccessfully press a sequence of buttons in order to progress the battle. the inner workings of that aren't very important right now...

basically, i'd like it if the game would prevent the party from being killed if they successfully key in the inputs shown. i'm able to have certain events play out in either a success or failure, so that's not where my issue lies

what i need is a way to have the game detect if the enemy action's target is 1. affected by the 'success' state (gained after winning a QTE sequence) and 2. at 0 HP, so that it can add 1 HP to that target.

i'm running into some issues though... in it's current state, if you win the QTE with more than 1HP left, the game will stall.
currently, i'm running this through the battle event processing like this

1779270654497.png


this, however, just results in the game softlocking because it won't run anything else, since the conditions are always met if i succeed at the QTE. i've tried having it turn the switch off immediately, having else branches stating to exit event processing, but none have worked... i'm not sure what to do.

does this make sense? i've tried it as a common event, turning the switch off at the very end outside of all the branches, but again, nothing works and the game just stalls because the event page's conditions are being met but nothing in the page is doing anything.

thanks in advance, you guys are great at what you do!!!
The battle event is set to keep running as long as the PROTECTION switch is ON. If it never gets turned off, it would loop indefinitely.

In your event, everything under "If: Callisto is affected by SUCCESS" is nested under "If: callisto hp = 0", meaning it will never check its conditions and run (and thus never turn off the PROTECTION switch) if Callisto's HP wasn't 0.
Your information is a bit limited, but I'll try to understand.
- Does the skill called "Success" only affect the character named "Cllisto"?
- Does it activate when HP is 0?
- When does the QTE activate?

From my understanding, the character has already died, and you restored their HP but didn't remove the "dead" status. The "dead" status activates immediately when the character's HP reaches 0. This might be why your game is freezing.

This is just speculation, it might not be correct.
The correct way to do this is to first create an invisible "immortal" state that resists death, and is applied to all actors at turn 0.

then you'll need one troop event for every actor triggering on HP=0.
in that troop event you check if the actor was protected or not, and either add +1 HP or remove the immortal state (causing death)
The correct way to do this is to first create an invisible "immortal" state that resists death, and is applied to all actors at turn 0.

then you'll need one troop event for every actor triggering on HP=0.
in that troop event you check if the actor was protected or not, and either add +1 HP or remove the immortal state (causing death)

ah yes, this worked!! i didnt realize the solution would be that easy all along.... thank you very much!!! thank you rifleman and amaranth too i really appreciate you all helping me!!!

i did have an immortal state made, which would be the 'success' state, but for some reason i didn't think to have the troop event trigger when the actor reached 0% hp... the more you know 😛
Success is already a state, right? And So no extra state is needed, use the success state for this. This should work cause:

That state is needed for this to trigger,
That state is removed once triggered.
the final solution ended up being something like this:

when you win a QTE, it turns on a 'protection' switch for each party member, as well as gives them the death prevention state (to keep them alive and not affected by knockout immediately - this is obviously because if they DO die, adding 1hp doesn't do anything, and the game will stall)
then, in a troop event page for each party member, if it detects that theyre at 0% HP and their switch is on, it'll check if they were already dead.
if they WERE already dead (from failing a qte) then it does nothing and ignores them. but if they had only just died (from the QTE that you won and would've killed you, then it heals them by 1hp instead

1779363827955.png


then once the attack is done, in a 'finish action' action sequence, i turned all protection switches off


i opted for the individual protection switches because if they were all affected by the same protection switch, it added 1hp to everyone if the QTE was won and they died, meaning that party members that were already dead were attempted to be revived - which again, stalls the game

that about covers my solution 😛 works perfectly! i haven't encountered any issues with it

Original thread: https://forums.rpgmakerweb.com/threads/prevent-knockout-add-1-hp-if-affected.183726/