Window_ScrollText.prototype.refresh = function () {
var textState = { index: 0 };
textState.text = this.convertEscapeCharacters(this._text);
this.resetFontSettings();
this._allTextHeight = this.calcTextHeight(textState, true);
this.createContents();
this.origin.y = -this.height;
var text = this._text;
var tw = this.textWidthEx(text);
var textX = (Graphics.boxWidth / 2) - (tw / 2);
this.drawTextEx(text, textX, 1);
};


Window_ScrollText.prototype.refresh = function () {
var textState = { index: 0 };
textState.text = this.convertEscapeCharacters(this._text);
this.resetFontSettings();
this._allTextHeight = this.calcTextHeight(textState, true);
this.createContents();
this.origin.y = -this.height;
var text = this._text;
var tw = this.textWidthEx(text);
var textX = 168 // (Graphics.boxWidth / 2) - (tw / 2);
this.drawTextEx(text, textX, 1);
};

Scene_Map.prototype.createScrollTextWindow = function() {
this._scrollTextWindow = new Window_ScrollText();
this._scrollTextWindow.x = 168;
this._scrollTextWindow.width = 816;
this.addWindow(this._scrollTextWindow);
};

Window_Command.prototype.windowHeight = function() {
return 3000;
};
Knew it was something silly, lol, wouldn't mind but I was staring at the code for about half an hour like an eejit and not seeing anything wrong. Never entered my head to check the most obvious thing which is usually the correct thing. Thanks dude.If statement conditions have to be enclosed in brackets.
This is what I have at the top of the main function:
I've triedvar parameters = PluginManager.parameters('BPE Lock Pick Window');
var BPEwindowX = Number(parameters['Window X']);
var BPEwindowY = Number(parameters['Window Y']);
var BPEcontrol = String(parameters['Control Switch']).trim() == "true";
var _Game_Interpreter_pluginCommand =
Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_Game_Interpreter_pluginCommand.call(this, command, args);
if(command === 'LP_On'){parameters.BPEcontrol = String("true")};
if(command === 'LP_Off'){parameters.BPEcontrol = String("false")};
};
but nothing changes and the window stays on the screen. Any suggestions would be helpful. The full plugin is here.if(command === 'LP_On'){BPEcontrol = String("true")};
if(command === 'LP_Off'){BPEcontrol = String("false")};
/*
* clockoutLockPickWindow.js
* 2017-06-01
* Copyright (c) 2017 Dominic Herrera
* License: Do anything you want.
* Disclaimer: NO WARRANTY.
*/
/*:
* @plugindesc Show lock pick count window via plugin command.
* @author Clock Out
*
* @help
* SYNOPSIS
* Toggle the lock pick count window.
*
* SYNTAX
* LP <ON|OFF>
*
* EXAMPLE
* LP ON
*/
var clockout = clockout || {};
clockout.window = clockout.window || {};
/**
* Create a window to track a $gameVariable value.
* @returns {object} The new window.
*/
clockout.window.lockPickWindow = function () {
"use strict";
var config = {
name: "Lock Pick",
numLines: 1,
variableId: 94,
width: 220,
x: 530,
y: 0
};
var window = Object.create(Window_Base.prototype);
window.refresh = function () {
var x;
window.contents.clear();
x = window.drawTextEx(
config.name,
0,
0,
window.windowWidth(),
"left"
);
window.drawText(
":" + $gameVariables.value(config.variableId),
x + 15,
0,
window.textWidth("000"),
"right"
);
};
window.initialize = (function (alias) {
return function () {
alias.apply(this, arguments);
this.openness = 0;
};
}(window.initialize));
window.update = (function (alias) {
return function () {
alias.call(this);
if (this.isOpen()) {
window.refresh();
}
};
}(window.update));
window.windowHeight = function () {
return window.fittingHeight(config.numLines);
};
window.windowWidth = function () {
return config.width;
};
// Setup the window.
window.initialize(
config.x,
config.y,
window.windowWidth(),
window.windowHeight()
);
window.refresh();
return window;
};
// Alias pluginCommand.
(function (alias) {
"use strict";
function pluginCommand(command, args) {
var isLoaded = SceneManager._scene.hasOwnProperty("lockPickWindow");
var window;
alias.call(this, command, args);
if (command !== "LP") {
return;
}
if (isLoaded === false) {
window = clockout.window.lockPickWindow();
SceneManager._scene.addWindow(window);
SceneManager._scene.lockPickWindow = window;
}
switch (args[0]) {
case "ON":
SceneManager._scene.lockPickWindow.open();
break;
case "OFF":
SceneManager._scene.lockPickWindow.close();
break;
}
}
Game_Interpreter.prototype.pluginCommand = pluginCommand;
}(Game_Interpreter.prototype.pluginCommand));