Its probebly the wrong forum to ask but still ill try.
Im want to know what i need to do to cause player transfer by scripting.
i got my scene window mapID etc. All im lacking it the command to transfer.
Thought i use the game_interpertrer code but to no avail...though that could be me since im not the best at this kind of stuff.
$gamePlayer.reserveTransfer(mapId, x, y, direction, fade type)
I've moved this thread to learning javascript. Please be sure to post your threads in the correct forum next time. Thank you.
Search the forum, there is a topic about the javascript equivalents to event commands.
And you simply need to use that equivalent of the transfer command
Ive tried that one since i too thought it was the right one. must be me still missing something.
Scene_Teleport.prototype.Teleport1 = function() {
$gamePlayer.reserveTransfer(mapid, x, y, direction, fade type)
};
However with my current knowlage i know how to define Mapid X and Y. direction im doubting on. In the past is used to be a 2,4,6 or 8.
when i replace mapid x and y with the parameters selected and set direction as 2 i get a Scene_Teleport is not defined message.
That i dont know how to define fadetype as 'black'be default aint helping either.
Scene_Teleport.prototype.Teleport1 = function() {
SceneManager.goto(Scene_Map);
};
I know im doing something wrong since i if put something else in its place like this. it just works properly and does what it must do in this case go to scene_map.
Can you write what you wrote??!
I mean give me example
var NAME1 = parameters['Teleport Name 1'];
var Map1 = parameters['Teleport Map 1'];
var CoordsX1 = parameters['Teleport CoordsX 1'];
var CoordsY1 = parameters['Teleport CoordsY 1'];
function Scene Teleport() {
this.initilize.apply(this, arguments);
}
Scene_Teleport.prototype = object.create(Sceme_MenuBase.prototype);
Scene_Teleport.prototype.constructor = Scene_Teleport;
Scene_Teleport.prototype.initilize = function() {
Scene_MenuBase.prototype.initilize.call(this);
};
Scene_Teleport.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
};
Scene_Teleport.prototype.stop = function() {
Scene_MenuBase.prototype.stop.call(this);
this.createCommandWindow();
};
Scene_Teleport.prototype.createCommandWindow = function() {
this._commandWindow = new Window_Teleport();
this._commandWindow.setHandler('Teleport Name 1', this.Teleport1.bind(this));
this._commandWindow.setHandler('cancel', this.popScene.bind(this));
this.addWindow(this._commandWindow);
};
Scene_Teleport.prototype.Teleport1 = function() {
$gamePlayer.reserveTransfer(Map1, CoordsX1, CoordsY1, 2, fadetype)
};
function Window_Teleport() {
this.initialize.apply(this, arguments);
}
Window_Teleport.prototype = Object.create(Window_Command.prototype);
Window_Teleport.prototype.constructor = Window_Teleport;
Window_Teleport.prototype.initialize = function() {
Window_Command.prototype.initialize.call(this, 0, 0);
this.updatePlacement();
this.openness = 0;
this.open();
};
Window_Teleport.prototype.updatePlacement = function() {
this.x = (Graphics.boxWidth - this.width) / 2;
this.y = (Graphics.boxHeight - this.height) / 2;
};
Window_Teleport.prototype.makeCommandList = function() {
this.addCommand(NAME1, 'Teleport Name 1');
};
As it is listed now i get the error 'fadetype is not defined' witch i can understand since i dont know what it is either.
When i put a number in its place consdiering it would follow the same logic as most things here being 0 =black 1 = white 2= none
I still get my commandmenu and it still is selectable and all but the game freezes forcin me to shut it off.
oke made some form of progress.
Scene_Teleport.prototype.Teleport1 = function() {
SceneManager.goto(Scene_Map);
$gamePlayer.reserveTransfer(Map1, CoordsX1, CoordsY1);
};
When i select my destination from my commandwindow my game freezes.
My character appears to be walking but i cant move anymore. cant open menu anything...
Without SceneManager.goto(Scene_Map) my game freezes to but now at the commandwindow itself 🙁