Imitating a "New Game" via script calls

Status
Not open for further replies.

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
231
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,822
Reaction score
1,247
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,116
Reaction score
5,367
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

The light has gone out of my life.

About time they finally press the kill switch button for older makers.
Sorry everyone, I am here sporadically. After 6 years of delays after delays in my life, I try to do all mat once and that means that I spread thin everywhere because it just is impossible to crunch 6 years in one or even two, but I try! I wish many of that I would already given you and put behind but... well...
I'm looking for an experienced gamer who has played a few games created with RPG Maker, who knows what an alpha build is, who may remember the old days when cliché was the favorite word on Creation Asylum, who, if a reviewer, would ask for my permission before making a review to post on YouTube, or whatever, since I will be messaging you a 10 minute, or so, DEMO based on an alpha build of Effervesce Fallacy™.
No matter how many times I listen to him, I know this is Joker speaking, but my brain can only hear Dagda.

Forum statistics

Threads
108,821
Messages
1,039,814
Members
141,279
Latest member
SawYuuki
Top