- 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:
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!
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!