[ASK] RPG Maker still on battle processing while either me or the enemy are dead

Hello, i want to ask something.
i use question dialogue on battle processing.
but if the enemy or the player died, the question still continue until run out of question. not force victory / game over scene.


any solution?


Here Is the Video, the problem are inside in the video.
Use one of the scripts call inside a conditional branch.


Enemy check:


$gameTroop.aliveMembers().length > 0






Ally check:


$gameParty.aliveMembers().length > 0






Here's an example code. In this case scenario, I want the skill to happen 6x. It should not happen when enemy dies. Therefore it should like this:


◆If:Repeat ≥ 6
  ◆Control Switches:#0001 戦闘行動強制スイッチ = OFF
  ◆
:Else
  ◆If:Script:$gameParty.aliveMembers().length > 0
    ◆Force Action:ハロルド, スパーク, Last Target
    ◆Control Variables:#0001 Repeat += 1
    ◆
  :Else
    ◆
  :End
  ◆
:End
Use one of the scripts call inside a conditional branch.


Enemy check:



$gameTroop.aliveMembers().length > 0






Ally check:



$gameParty.aliveMembers().length > 0






Here's an example code. In this case scenario, I want the skill to happen 6x. It should not happen when enemy dies. Therefore it should like this:


◆If:Repeat ≥ 6
  ◆Control Switches:#0001 戦闘行動強制スイッチ = OFF
  ◆
:Else
  ◆If:Script:$gameParty.aliveMembers().length > 0
    ◆Force Action:ハロルド, スパーク, Last Target
    ◆Control Variables:#0001 Repeat += 1
    ◆
  :Else
    ◆
  :End
  ◆
:End

Thanks, i'll try it 😀


UPDATE :  i'm already try it, but still can't do the force victory scene / game over scene.. 🙁

Original thread: https://forums.rpgmakerweb.com/threads/ask-rpg-maker-still-on-battle-processing-while-either-me-or-the-enemy-are-dead.70171/