Stop escape abilities escaping from boss battles/event battles

I have a character with an ability that allows the party to escape from battle, but I've tested it on an event-battle where escaping is not an option, and the party is still able to run away.

I would like a check or something that makes sure the battle can be run from before letting the skill have them escape.

Thank you for any assistance you can provide.
I don't have VX Ace but based on the required conditions, you may try, but are not limited to, the following suggestions in mind:

1. [Temporary Removal]
Before the Battle Processing, you may *remove* the specific skill of the actor and then return it after the battle.

//Use this method if the specific skill of the actor is purely for escaping purposes only

1657570262890.png

2. Scripts
You may probably mess with the Battle Events using scripts (maybe somebody may be able to help)

3. [Skill Cloning]
You may want to brute force your way here(let's gooo)
- Copy your actor's "escaping skill" and paste on another skill slot
- Remove the "Escape" functionality on that cloned skill
- Remove the original Escape skill before the Battle Processing
- Add the cloned Escape skill before the Battle Processing

after the battle processing, remove the cloned skill and then add the original one.
How have you set up your skill?

When I did this I had the skill call a common event. All that c.e. did was to run the 'Abort Battle' command.
To stop this happening for a boss battle, the Abort command was inside a conditional, which was whether BOSS BATTLE switch was OFF or ON. The Abort command was in the OFF branch. Immediately before an evented battle where I didn't want Escape to be used, I turned the switch ON, remembering to turn it OFF again after the battle.

This, I think, is the simplest way of doing it and the least likely to cause problems elsewhere.
1657571568931.png


In RMMV, you can just have it the special effect of Escape present or not (I'm not sure if this exists in VXA)

Although I'm most probably leaning on the Skill Cloning method that I suggested earlier.
You'll just have to temporarily replace your "escaping skill" with a clone that does nothing or maybe calls a common event which outputs a text "The party can't escape!"

//Btw, I'm assuming you're using RMVXA and not RMMZ as this is under the vxa support
the party is still able to run away
That's because the process escape is being allowed because you call it directly in the skill.
From the party command it is blocked because in the code it checks if it is possible and blocks the command. But your skill does not do this check.
So Kes is right, but you don't need to use a variable.
Set the skill to call a common event.
In the CE, write a script section from the command
1657593360077.png

then this will do a check and do the escape if it is possible.
Here I also added a message if you can't escape.
if BattleManager.can_escape?

Original thread: https://forums.rpgmakerweb.com/threads/stop-escape-abilities-escaping-from-boss-battles-event-battles.149381/