Imitating a "New Game" via script calls

Status
Not open for further replies.

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
232
Reaction score
20
First Language
Spanish
Primarily Uses
RMMV
Working on my custom on map title screen. Could I somehow force a New Game via script call?
I've tried SceneManager.push(Scene_Map); ,but it doesn't seem to work properly. It seemingly ignores the player's game start location and doesn't clear any switches, variables, etc.

Would it be better to just use normal transfer player command with these:
$gameSelfSwitches.clear();
and $gameSwitches.clear(); , $gameVariables.clear();

I haven't tested them yet. Would they clear all the data from all of the maps?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,843
Reaction score
1,268
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi!
I believe you can use DataManager.setupNewGame()
Just for reference:

DataManager.setupNewGame = function() {
this.createGameObjects();
this.selectSavefileForNewGame();
$gameParty.setupStartingMembers();
$gamePlayer.reserveTransfer($dataSystem.startMapId,
$dataSystem.startX, $dataSystem.startY);
Graphics.frameCount = 0;
};


Don't know exactly what you are doing, but this will take you to the first map. If your first map is your title screen, then will do nothing. Do you are making this in a map or in a custom scene title?
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,140
Reaction score
5,378
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Do you like to practice level design? I do hahahaha! It's not from a specific game, it's just some tests...Fase 1.png
I really need a better indicator of where you can jump up and down though I feel... otherwise I like how this turned out for the first part of the first dungeon of the game.
@Shaz needs to make a website for his plugins. (it can be done easily for free with google sites.) I can't find a database of them anywhere!
Dion2.jpg

testing #2

Forum statistics

Threads
109,128
Messages
1,042,379
Members
141,629
Latest member
YOURBESTFRIIEND
Top