Created
November 9, 2021 23:44
-
-
Save triacontane/9bf0975409c928f2a44725866bc575cb to your computer and use it in GitHub Desktop.
装備品を解除させられたアクターのIDを保持
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*: | |
* @plugindesc 装備品を解除させられたアクターのIDを保持 | |
* @target MZ | |
*/ | |
(()=> { | |
const variableId = 1; | |
const _Game_Actor_discardEquip = Game_Actor.prototype.discardEquip; | |
Game_Actor.prototype.discardEquip = function(item) { | |
_Game_Actor_discardEquip.apply(this, arguments); | |
$gameVariables.setValue(variableId, this.actorId()); | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
装備品を解除させられたアクターのIDを保持します。
イベントコマンド「武器を減らす」などで「装備品を含める」で最後に装備解除したアクターのIDです。
ただし、複数のアクターの装備を解除した場合も最後に解除したアクターのIDしか保持できません。