Can't call my scene while ingame

I can call my scene from the title screen with this command.

Scene_Title.prototype.commandSTG = function() { DataManager.setupNewGame() this._commandWindow.close() this.fadeOutAll() SceneManager.goto(Scene_STG)}But when I call it from an event with the Event Command, Script..., it's telling me "Scene_STG is not defined".
http://imgur.com/a/vL7ny/
 
This is the code relevant to this scene.

function Scene_STG() {this.initialize.apply(this,arguments)}Scene_STG.prototype = Object.create(Scene_Base.prototype)Scene_STG.prototype.constructor = Scene_STGScene_STG.prototype.initialize = function() {Scene_Base.prototype.initialize.call(this)}Scene_STG.prototype.start = function() {Scene_Base.prototype.start.call(this)}Scene_STG.prototype.create = function(){ Scene_Base.prototype.create.call(this) this.createBackground()}Scene_STG.prototype.createBackground = function() { this._backgroundSprite = new Sprite() this._backgroundSprite.bitmap = ImageManager.loadParallax('BlueSky') this.addChild(this._backgroundSprite)}Fixed it.

It looks like the problem was that I was creating my plugin inside of an anonymous function... Shouldn't have tried to follow a template, I guess?

Original thread: https://forums.rpgmakerweb.com/threads/cant-call-my-scene-while-ingame.52281/