Hello everybody.
Since this was some issue to me, I asked somebody to help me and he gave me a nice code which works as intended to disable items etc. from the battlescreen.
Now I simply want to add onto the code to make this a little more comfortable and release this plugin. But I am not good at javascript at all, I only know some C#. But that does not really help me here even tho it is quite similar to javascript.
The piece of code is as followed:
(I added onto it already! And yes it works)
var addItemCommand = Window_ActorCommand.prototype.addItemCommand;
Window_ActorCommand.prototype.addItemCommand = function() {
if (!$gameSwitches.value(5)) { addItemCommand.call(this) }
}
var addGuardCommand = Window_ActorCommand.prototype.addGuardCommand;
Window_ActorCommand.prototype.addGuardCommand = function() {
if (!$gameSwitches.value(6)) { addGuardCommand.call(this) }
}
var addAttackCommand = Window_ActorCommand.prototype.addAttackCommand;
Window_ActorCommand.prototype.addAttackCommand = function() {
if (!$gameSwitches.value(7)) { addAttackCommand.call(this) }
}
And what I want now is to make it so, that I can change the value of the switch number within the Plugins Parameter.
I have done some basic information and added the basic parameter. But in the script it's obviously not called / connected to the value yet.
And if possible, it would be nice if somebody could also add the ''Escape'' mechanic to it. So that Escape can be completly removed with a switch as well.
I did not figure out how to do it yet.
The Plugin then can just be downloaded from anywhere for everyone! I just personally found it important to have something ''New'' which works with all current plugins out there without any errors.
Thanks in advance.
Since this was some issue to me, I asked somebody to help me and he gave me a nice code which works as intended to disable items etc. from the battlescreen.
Now I simply want to add onto the code to make this a little more comfortable and release this plugin. But I am not good at javascript at all, I only know some C#. But that does not really help me here even tho it is quite similar to javascript.
The piece of code is as followed:
(I added onto it already! And yes it works)
var addItemCommand = Window_ActorCommand.prototype.addItemCommand;
Window_ActorCommand.prototype.addItemCommand = function() {
if (!$gameSwitches.value(5)) { addItemCommand.call(this) }
}
var addGuardCommand = Window_ActorCommand.prototype.addGuardCommand;
Window_ActorCommand.prototype.addGuardCommand = function() {
if (!$gameSwitches.value(6)) { addGuardCommand.call(this) }
}
var addAttackCommand = Window_ActorCommand.prototype.addAttackCommand;
Window_ActorCommand.prototype.addAttackCommand = function() {
if (!$gameSwitches.value(7)) { addAttackCommand.call(this) }
}
And what I want now is to make it so, that I can change the value of the switch number within the Plugins Parameter.
I have done some basic information and added the basic parameter. But in the script it's obviously not called / connected to the value yet.
And if possible, it would be nice if somebody could also add the ''Escape'' mechanic to it. So that Escape can be completly removed with a switch as well.
I did not figure out how to do it yet.
The Plugin then can just be downloaded from anywhere for everyone! I just personally found it important to have something ''New'' which works with all current plugins out there without any errors.
Thanks in advance.