RMMV Chrono/Cross Engine ABS: Turning Switch on/off when guarding

DTurtle

Regular
Regular
Joined
Nov 23, 2016
Messages
42
Reaction score
4
Primarily Uses
N/A
Hi! Currently using the Cross Engine on MV (Restart's pixel-movement version of MOG's Chrono Engine) and I'm trying to turn a game switch on while guarding, then turn the switch off when guarding ends.

I'm not great at JS, but I managed to turn the switch on while guarding with the following:

Code:
//==============================
// * command Ras Guard
//==============================
Game_Player.prototype.commandRasGuard = function() {
    this.battler()._ras.guard.active = true;
    this.updateGuardDirection();
$gameSwitches.setValue(16, true);
};

However, I can't find a spot where I can add in a "$gameSwitches.setValue(16, false);" to flip the switch off when the player stops guarding. Any help would be appreciated!
 

Latest Threads

Latest Profile Posts

Yknow what? Im seriously considering recruiting a manager to oversee my games development.
Because I cannot focus or complete these tasks by myself. I need someone to give me orders, without having them be my boss.
yp_4vS.png

Remember my latest plugin for rpg maker mz:

Acknowledgement Window is now available!

Take a look here:

Got my focus back, 9/59 maps have the door fix in place now.
Making a small RMMV project has made me realize that I've never actually made a credits sequence for a game.

Forum statistics

Threads
136,802
Messages
1,270,174
Members
180,557
Latest member
nlee
Top