killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
I am trying to make a skill that makes the party escape the battle, so I made it call a common event and use the abort battle command. But when I am on a Boss Battle, I set to battle so the actors can't escape. How do check that in a "if" statement?

I tried if script "$gameParty._canEscape = true" and "BattleManager._canEscape = true", but none seem to work, it always returns true.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
867
First Language
German
Primarily Uses
Because you are setting these attributes and receive their assigned values. Comparison is done with "==" or "===". Since you are comparing to if, you can leave it out completely and just write:

if(BattleManager.canEscape()) { ... }Attributes prefixed with "_" are intented for private usage and you should not use them, unless there is no other option.
 

killerfer

Veteran
Veteran
Joined
Nov 4, 2015
Messages
198
Reaction score
50
First Language
Portuguese
@Iavra

Thank you so much. It worked. I'm a real newbie in javascript so all the commands confuse me. Thanks for the help.
 

Latest Threads

Latest Posts

Latest Profile Posts

Sorry, lot of unexpected hospital things. I'm trying. Life is hectic atm. I know it must seem like I say this every week. XD Anybody wanna trade me for awhile so I can game test and game make?
I love running events, I hate setting up all the awards at the end. >_> But you know, gotta do it :B :B :B

Forum statistics

Threads
111,245
Messages
1,059,541
Members
144,509
Latest member
Rann
Top