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,840
Reaction score
1,263
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,137
Reaction score
5,374
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

I once thought about a boss gauntled game. I actually did it.
Stream will be live shortly with some Gex 3! Feel free to drop by!
Snippet from a game I'm working on. Not much happening here. Mostly look at atmosphere. May upload a longer version. Still need to make up some enemy arts.
Been slightly struggling with developing the latest chapter, I think I will downscale my ambitions and make it more linear.

Forum statistics

Threads
109,057
Messages
1,041,689
Members
141,544
Latest member
spacewaxamerica
Top