Why isn't this battle event working

Screenshot 2024-12-17 at 10.04.52.png
Screenshot 2024-12-17 at 10.07.47.png

It's just literally this. As you can see I have a whale type enemy, when it gets to half health it is supposed to trigger a skill, Swallow Whole which in turn calls a common event that plays an animation, ends the battle and transfers you to a whale stomach dungeon. Basic. And, when you battle test, it works perfectly, he does the skill as soon as he is on half hp.
But in the main game test it simply doesn't work.
Any clues?
Is there a reason for it to Force Action into Common Event? It looks like everything that the common event is doing could just be put into the battle event, and if there's a reason you'd want to call the Common Event multiple times then you could directly call the Common Event instead of using Force Action.

But in the main game test it simply doesn't work.
What happens in the game test? Can you kill the Leviathan? Also, do you have any plugins, especially ones that affect battle?
You're not supposed to kill the enemy. It's meant to activate the skill before it dies. In the game test it just doesn't activate the skill.

I tried making it activate on death and giving it immortal status but i had some trouble getting the command to give it the status.

I went with Force Action because I wanted the flavour that the Leviathan is using a move to swallow you.

When you fight it the second time, you get an item to provent it from doing that- was going to add a condition to prevent the move from working but haven't got that far.

I tried skipping force action and just making a common event as you suggested, once again, works fine in the battle test but not in the main game.

I've had problems with the battle script before - it seems to be disingenous about what the terms "moment, turn and battle" actually mean, but i have tried all permutations and no joy.

I've got the usual Visustella battle core, but it's the same with it off and on.
I've had problems with the battle script before - it seems to be disingenous about what the terms "moment, turn and battle" actually mean
That should not be the case unless you have you have plugins modifying it - which is the clue you have from your original problem, where you see it working correctly in battle test but not in a full play test.

The only difference between those things is that a play test has all plugins and their notetags fully loaded.

So for your troubleshooting you should be:
- turning off all plugins, not just the Battle Core you think could be involved. Save your project, start a new play test (not loading a save).

- putting a troubleshooting message in there, do a Show Text above the Force Action so you can narrow down whether the problem is that the action isn't getting performed or the event isn't getting run.

Note that I'm unsure whether that entire event will function at all, with commands taking place after the Abort Battle; but that will be seen once you get the event to run in the first place.
The issue is most likely how Force Action works. Plugins modify it often too, so you can get odd behavior out of that. You *really* would be better off putting it all in one event. I think you can even add the animations and such if it really matters to you.
Screenshot 2024-12-17 at 18.46.38.png
To clarify i disabled all cores, reloaded, etc. Still works in test. Doesn't work in game.

To make matters worse I made a similar event for another enemy - this
Screenshot 2024-12-17 at 18.52.27.png
one works perfectly!

I guess we're not going to get to the bottom of it. Lesson I learned about RPG maker - if you spend more than an hour or so trying to get something to work, do it in a different way.
I guess we're not going to get to the bottom of it.
You do you, but that seems like a silly defeatist attitude to me. From my personal experience, if you can't push through taking a few hours to fix something - or move on to something else and revisit it with fresh eyes another day - you're going to have a hard time completing a game.

To me, the obvious implication is that the correct enemy is not being checked for low HP. Have you tried removing all enemies from that troop, then putting the Leviathan back in?

Of course, the other obvious solution is if it's working in other troops, you can just make a new troop, put the Leviathan in, make the troop event, and replace the troop ID in the event that's calling it in your game - but there's no reason one specific troop wouldn't work correctly with its troop events.

Anyway, good luck with your project.
Ok, just hear me out.

I was... running the wrong event.
I'd actually made two leviathan troops, one with the condition and one without...

It was calling the wrong one.

One other thing I learned about RPG maker, if something really doesn't work you have done something stupid.

Sorry everyone, and thanks Turan as always. You wouldn't believe how close this one is to finishing!

Original thread: https://forums.rpgmakerweb.com/threads/why-isnt-this-battle-event-working.173971/