Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
I want to restrict Escape to the use of a skill, rather than something from the battle command menu. I have the skill call a common event with 'Abort Battle' command. However, obviously I don't want this to be usable for a boss battle, so need a way of restricting this if necessary.

However, I've drawn a blank on how to do this. It's probably something obvious to everyone else, but not to me.

Can anyone help me out?
Thanks.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,873
Reaction score
4,816
First Language
English
Primarily Uses
RMMZ
Maybe create a switch that enables/disables escape and use it as a condition for a successful escape in your common event. You can always activate/deactivate that switch just before entering a boss battle.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,170
Reaction score
7,377
First Language
Indonesian
Primarily Uses
RMVXA
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-restrictions/
use a notetag
Code:
<restrict if switch: x>
then flip the switch to disable the skill
(disclaimer, I never use this feature from the script)

An alternative would be a condition check on your common event if the switch is ON, then don't abort. But I guess that you don't want the skill to be usable at all from the menu.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
@MushroomCake28 That has the merit of great simplicity. I knew it would be something obvious (obvious, that is, to other people, not to me).

@TheoAllen I'm not sure what using this script (which I'm using for other purposes, so it's already installed) would add to MushroomCake28's suggestion. Could you explain? As for not using the skill from the Menu, if it is set to Battle only, then that shouldn't be a problem, unless I've overlooked something?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,170
Reaction score
7,377
First Language
Indonesian
Primarily Uses
RMVXA
@Kes the difference with my solution and mushcake's one is, if you use the common event route, the skill is actually used then it calls a common event. If you go with my route, the skill is grayed out, effectively disabled it when the switch is flipped. Also by the menu, I mean, when you select the skill from the skill menu window during battle.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,789
Reaction score
14,591
First Language
English
Primarily Uses
RMVXA
One thing to be careful of here. I had an escape skill originally in The Book of Shadows, but I did notice a strange quirk. If you used it to escape and an actor was KO'd, you'd get a game over instead of running away. May want to test and see if that occurs for you as well.

Though Abort Battle might get around this, as I was using the feature Escape command when I did it. Still may want to give it a test to be sure.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,305
Reaction score
11,735
First Language
English
Primarily Uses
RMVXA
@bgillisp Just for the sake of absolute clarity (because my brain feels fried atm) do you mean if any actor was ko'd? Obviously it can't be the actor with the skill, because if they are ko'd, then they can't use the skill.

Having had a look at BattleManager, I think I'm correct in saying that Abort battle takes no notice of who is alive and who is not, but perhaps someone with greater understanding of the core scripts could advise on that.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,789
Reaction score
14,591
First Language
English
Primarily Uses
RMVXA
It was if anyone was kod but I think that's also due to how escape feature works. I've had no issue with abort battle though so I imagine you'll have no issue
 

Latest Threads

Latest Profile Posts

I feel still screenshots don't do my game justice. the characters don't move, but the filter over them does...
Wonder if this year, there be more MZ plugin than MV or that MZ is still small compare to whole MV collection
Zaj
Hey morning all! I got another quick question..I just switched to RMMZ from VX Ace..so I am wondering why default scripts(is that how u call it) of VXAce is available, but not in MZ's case? How do I figure out ahh I mean could you show me
Sometimes im the biggest fool alive... Ah well, ce la vie
The worst feeling in the world is going for a walk on a nice summer day, seeing an ice cream truck, and realizing you don't have any money with you :(

Forum statistics

Threads
111,346
Messages
1,060,363
Members
144,672
Latest member
oddRABBIT
Top