Hi,
i'd like when an item is used for it to modify a variable, while cheking on which actor the item was used. I know it's possible to trigger a common event when an item is used, but not to check on which actor the item was used. And this is crucial to the little system i'm developing for my game. Think as each actor has a hunger associated variable and each time an item is used it removes some of this variable, while on each day that passes the hunger build up a little.
I checked the game source code and found this
Game_Battler.prototype.useItem = function(item) {
if (DataManager.isSkill(item)) {
this.paySkillCost(item);
} else if (DataManager.isItem(item)) {
this.consumeItem(item);
}
};
But can't seem to find where exactly i can recover on which actor was the item used. That way i could make a simple conditional to check and redcue the hunger meter.
i'd like when an item is used for it to modify a variable, while cheking on which actor the item was used. I know it's possible to trigger a common event when an item is used, but not to check on which actor the item was used. And this is crucial to the little system i'm developing for my game. Think as each actor has a hunger associated variable and each time an item is used it removes some of this variable, while on each day that passes the hunger build up a little.
I checked the game source code and found this
Game_Battler.prototype.useItem = function(item) {
if (DataManager.isSkill(item)) {
this.paySkillCost(item);
} else if (DataManager.isItem(item)) {
this.consumeItem(item);
}
};
But can't seem to find where exactly i can recover on which actor was the item used. That way i could make a simple conditional to check and redcue the hunger meter.