Transfer player on game start

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
Is there a method that when the game starts that it transfers the player to a certain location rather they load a save or not?


For example, I save my game on a map, close it, open the game again, I load my save but instead of being on the map that I saved on I am on a predefined map.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
54
First Language
English
Primarily Uses
RMMV
I'm not in a position to go poke around my rpgmaker, but you could probably do something like a global condition branch, that when a game is saved and then exited, that it teleport the player to those specific coordinates before the exit/save.

Otherwise you might have to have a script created that can do that.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,763
Reaction score
14,007
First Language
English
Primarily Uses
RMMV
For new game, just put the player's starting location where you want them to be.


When loading from a save file, I'd look at Scene_Load.prototype.reloadMapIfUpdated - comment out the condition and use values rather than variables for the reserveTransfer() call.
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
For new game, just put the player's starting location where you want them to be.


When loading from a save file, I'd look at Scene_Load.prototype.reloadMapIfUpdated - comment out the condition and use values rather than variables for the reserveTransfer() call.

Pretty sure that doesn't exist in ace ;) But thank you, gave me an idea where to look.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
40,763
Reaction score
14,007
First Language
English
Primarily Uses
RMMV
Sorry - for some reason I thought you were talking MV.  However, there IS a load_map_if_updated method in Ace, in the DataManager script.  And it's even easier than MV:

Code:
  #--------------------------------------------------------------------------
  # * Reload Map if Data Is Updated
  #--------------------------------------------------------------------------
  def self.reload_map_if_updated
    if $game_system.version_id != $data_system.version_id
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
      $game_player.make_encounter_count
    end
  end

Again, get rid of the conditions surrounding the block, and replace the map and player coordinates with the values you want to use.  Easy peasy :)
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
Thanks, works perfectly!
 

SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
87
Reaction score
8
Primarily Uses
DP3 has a script snippet that lets you run a common event on loading. You could just use that and handle the transfer there. Maybe use a conditional branch so that you can change where the spawn point is.
 

Latest Threads

Latest Posts

Latest Profile Posts

2021? I still wonder if people still doing MV than MZ more
Seeing a lot more active Ace topics recently, is it making a comeback? :o
0-7, left-to-right, top-to-bottom
As soon as I'm able to get out of bed I'm probably gonna go so hyper from being too cooped up, and burn myself out into another awful flare. lol
It makes me feel proud whenever an RM game does well. Even though I had nothing to do with it.

Forum statistics

Threads
107,627
Messages
1,031,013
Members
139,746
Latest member
Krunga
Top