Complicated question time!
I have evented a system with common events and using YEP Plugins (Mainly Event Copier and Spawner for this one) in order to farm, forage, fish, and mine. I wanted an easier way for the player to farm and fish by "equipping" an item (Using an item once in the inventory to then run a common event to turn a switch on or off) to be able to do these tasks. I also figured out a common event system to be able to right click and run a common event, using the code below.
Right now the right-click system works great. It spawns my tilled soil exactly where I want it and casts my line if I'm in the right areas. But the issue I now face is, I want to make a check to see if I'm right-clicking on an event before running my common event (I'm sure there's a way do a conditional branch for this within the common event). If the common event doesn't run, however, and I right-click on an event that is looking for that input, it only runs if I am also pressing down on a directional key towards the event, and then right-clicking and I really don't know why that is. Any ideas on how to fix this?
I have evented a system with common events and using YEP Plugins (Mainly Event Copier and Spawner for this one) in order to farm, forage, fish, and mine. I wanted an easier way for the player to farm and fish by "equipping" an item (Using an item once in the inventory to then run a common event to turn a switch on or off) to be able to do these tasks. I also figured out a common event system to be able to right click and run a common event, using the code below.
Code:
(function() {
var _Astfgl_newSMU = Scene_Map.prototype.update
Scene_Map.prototype.update = function() {
_Astfgl_newSMU.call(this);
if (TouchInput.isCancelled()) {
$gameTemp.reserveCommonEvent(4); //change 4 to the id of the common event you want to call
}
}
})();
Right now the right-click system works great. It spawns my tilled soil exactly where I want it and casts my line if I'm in the right areas. But the issue I now face is, I want to make a check to see if I'm right-clicking on an event before running my common event (I'm sure there's a way do a conditional branch for this within the common event). If the common event doesn't run, however, and I right-click on an event that is looking for that input, it only runs if I am also pressing down on a directional key towards the event, and then right-clicking and I really don't know why that is. Any ideas on how to fix this?