can i use pluginCommand in multiple JS files?

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
Hi guys, simple question.


Can i have same header here with other files .JS.


or i need to change variable ex: 


var jon_interpreterCommand


var jon_interpreterCommand2


var jon_interpreterCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
jon_interpreterCommand.call(this, command, args);


because , my plugin.js are very huge, so i want to split some command line to put in other js file.


What the best ways 


Tanks you
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
It depends on how you setup your plugins. Are you defining all your code in an anonymous function? If not, then your aliases will be global variables, and you will need to rename them.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
It depends on how you setup your plugins. Are you defining all your code in an anonymous function? If not, then your aliases will be global variables, and you will need to rename them.
ok txs
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top