Imitating a "New Game" via script calls

Status
Not open for further replies.

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
259
Reaction score
28
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,888
Reaction score
1,364
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,324
Reaction score
5,488
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 Posts

Latest Profile Posts

It seems that I have to change the order with which I make the fantasy games on my bucket list, because the intended title is used as a story element in the first two games in the line, and somebody else might take the title for their own game because the term uses real words. I can't risk going over the apparent three year limit for registering trademark ahead of time.
I am interested in collaborations so if you like my art, hit up my messages! :wub
unknown.png

Making good progress with the second chapter. :)

Still work in progress.

(Real life, it is chronically the fourth chapter that I am making.)
constructionworkconcept.pngezgif-2-0acb620ecf8d.gifezgif-2-afeaf16ebb8d.gif "The Great Wall is great. But, most people can only be the slaves who built it, leaving their bones underneath that wall. They spent their whole life to build that wall and the empire, an empire that enslaves them." :kaoswt2: I'm just going to turn it into a modern-day sad tale.

Forum statistics

Threads
110,672
Messages
1,055,091
Members
143,796
Latest member
ShadyBrain_Entertainment
Top