- Joined
- Jan 18, 2015
- Messages
- 28
- Reaction score
- 0
- First Language
- English
- Primarily Uses
Here is some code I've written:
I have a parallel process event that sends the plugin command "run". I want it to be an incredibly simple day and night cycle just to get the hang of creating plugins, running them, etc. I can't seem to get this to run.
(function(){
var dayLength = 5;
var nightLength = 500;
var currentTime = 0;
var tint_speed = 30;
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command) {
_Game_Interpreter_pluginCommand.call(this, command);
if(command == "run"){
$gameMessage.add("Trying to work ;-;");
while(True){
currentTime = 0;
$gameScreen.startTint([0,0,0,0], tint_speed);
while(currentTime < dayLength){
currentTime ++;
print("Day-ing")
}
currentTime = 0;
while(currentTime < nightLength){
currentTime ++;
}
$gameScreen.startTint([-136,-136,-35, 70], duration);
}
}
})();
var dayLength = 5;
var nightLength = 500;
var currentTime = 0;
var tint_speed = 30;
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command) {
_Game_Interpreter_pluginCommand.call(this, command);
if(command == "run"){
$gameMessage.add("Trying to work ;-;");
while(True){
currentTime = 0;
$gameScreen.startTint([0,0,0,0], tint_speed);
while(currentTime < dayLength){
currentTime ++;
print("Day-ing")
}
currentTime = 0;
while(currentTime < nightLength){
currentTime ++;
}
$gameScreen.startTint([-136,-136,-35, 70], duration);
}
}
})();



