Ally keep attacking even after enemy died



So I made an assist feature using force action. Assist will active when it reach turn limit (Increase assist turn every ally action), and do action on next turn. But turns out, after all enemy died, the ally keep attacking before victory phase

I also trying to use BattleManager.processVictory(), but got issue on next battle, the troop event doesn't run properly

How to solve this problem
Can you just put a conditional to the assist that $gameTroop.aliveMembers().length > 0
Can you just put a conditional to the assist that $gameTroop.aliveMembers().length > 0
That's what I did too when trying to use BattleManager.processVictory() with something like this in skill notetag


<finish action>
if ($gameTroop.aliveMembers().length == 0)
eval: BattleManager.processVictory()
end
</finish action>
But this cause broken on next battle, which is doesn't run troop event with this condition

1739023979659.png


I also made a custom function that contains processVictory() and updateBattleEnd(), but still doesn't work properly
Why try and change the functions? Can't you just put a conditional on your assist mechanic? It's best if you show people how you did your assist.
Why try and change the functions? Can't you just put a conditional on your assist mechanic? It's best if you show people how you did your assist.
oh yeah I forgot about that

Here's how the assist work:
Add state and run the script inside notetag for every ally action
1739065667306.png

After that, it will check on every actor that do the assist
1739065742650.png

Each common event has their own moves (Different turn limit, different skill usage)
1739065619780.png


There's also initialize before battle begin using common event
1739066491098.png

1739066529071.png


After reach threshold (In this case, Schumaker has 2 turn to trigger), it will trigger the assist
1739066269453.png


Here's the skill in skill tab. I was adding the finish action but messed up when doing another battle in next one (Won't trigger the troop event)
1739066404659.png


Edit:
I was changing from Action Start to Action End and it works fine now to prevent redundant attack
1739069819716.png


Sorry to bother before. It seems the issue is in myself . It's quite clear now

I can close this
This thread is closed due to being reported as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/ally-keep-attacking-even-after-enemy-died.175257/