So, here's what I'm attempting to do:
In my game, when the player "guards," their character puts an energy shield in front of them. With the current SV battle system, when that character gets hit or evades, their motion changes, and then the guard motion disappears after the first hit/miss. They then return to their idle stance, even though I want them guarding that entire turn.
I searched online and found this script. Essentially, it's close to doing what I want it to do. You guard, barrier up, and the game ignores damage and evade motions. Energy shield stays up during the duration of guard. However; it gets rid of damage and evade motions for the entire battle. I messed around with the code and can't figure out if there's a way to make the "damage" and "evade" motions only stop when the player is guarding? Not the entire battle. Is there anything that can be added or changed below?
BTW... this isn't from a plugin someone created. It was just scripting someone gave on a Steam forum with no terms attached, so I'm assuming it can be changed/modified. I'd post the thread I found this from, but I'm not sure if that's allowed since it's from an external site...
Here's the code:
var _Game_Battler_requestMotion = Game_Battler.prototype.requestMotion;
Game_Battler.prototype.requestMotion = function(motionType) {
if (this._motionType === 'guard') {
if (!['damage','evade'].contains(motionType)) {
_Game_Battler_requestMotion.call(this, motionType);
}
}
};
In my game, when the player "guards," their character puts an energy shield in front of them. With the current SV battle system, when that character gets hit or evades, their motion changes, and then the guard motion disappears after the first hit/miss. They then return to their idle stance, even though I want them guarding that entire turn.
I searched online and found this script. Essentially, it's close to doing what I want it to do. You guard, barrier up, and the game ignores damage and evade motions. Energy shield stays up during the duration of guard. However; it gets rid of damage and evade motions for the entire battle. I messed around with the code and can't figure out if there's a way to make the "damage" and "evade" motions only stop when the player is guarding? Not the entire battle. Is there anything that can be added or changed below?
BTW... this isn't from a plugin someone created. It was just scripting someone gave on a Steam forum with no terms attached, so I'm assuming it can be changed/modified. I'd post the thread I found this from, but I'm not sure if that's allowed since it's from an external site...
Here's the code:
var _Game_Battler_requestMotion = Game_Battler.prototype.requestMotion;
Game_Battler.prototype.requestMotion = function(motionType) {
if (this._motionType === 'guard') {
if (!['damage','evade'].contains(motionType)) {
_Game_Battler_requestMotion.call(this, motionType);
}
}
};