Load game - player start from variable

shftatsix

Villager
Member
Joined
Jun 27, 2014
Messages
10
Reaction score
5
First Language
English
Primarily Uses
What I have: a common event that saves where you are (variable 1 player x, variable 2 player y, variable 3 map ID) then transports you to a camp/save map to save and then upon leaving it takes you back to your x, y, id. This works fine but when you load up a save it takes you to the camp.

What I'm looking for: when you load a game it takes you to saved x, y, id instead of the camp map.

Can this be done with events or do I have to learn how to script? I know it's a small issue and works without changing anything, but it's the little things ya know?
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
What I have: a common event that saves where you are (variable 1 player x, variable 2 player y, variable 3 map ID) then transports you to a camp/save map to save and then upon leaving it takes you back to your x, y, id. This works fine but when you load up a save it takes you to the camp.

What I'm looking for: when you load a game it takes you to saved x, y, id instead of the camp map.

Can this be done with events or do I have to learn how to script? I know it's a small issue and works without changing anything, but it's the little things ya know?
You can have a autorun event that makes the screen black, then transport the char to the Variable's location. this way when they load the game, it would make it seem like they start off at the variables location.
 
Last edited by a moderator:

shftatsix

Villager
Member
Joined
Jun 27, 2014
Messages
10
Reaction score
5
First Language
English
Primarily Uses
Wouldn't the autorun run when first entering the camp map? Transporting you back before you can save

Edit: to clarify, you select camp from the menu and transfer to this map, you can walk around, eat, choose party members and save. When you save, it saves you at this map.
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
You can do this via a bit of editing to the core scripts.

I'll look into it a bit once I get home from work, but you should be able to edit the load function to turn on a switch at load.

Then run an autorun event in camp to teleport the player to the presaved variables if the switch is on.
 

shftatsix

Villager
Member
Joined
Jun 27, 2014
Messages
10
Reaction score
5
First Language
English
Primarily Uses
Even if I'm using Yanfly Save Engine?
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
Wouldn't the autorun run when first entering the camp map? Transporting you back before you can save

Edit: to clarify, you select camp from the menu and transfer to this map, you can walk around, eat, choose party members and save. When you save, it saves you at this map.
Well no, because you make it require a switch, that gets turned on during the autorun event you are likely using to prompt the save screen in the first place.

So rather you are exiting the save menu to continue playing or you are loading a past save, the switch required autorun event will handle your return trip to the normal map.

Note: Make sure you make it so, when you click the camp menu command, it turns off the switch.
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
Even if I'm using Yanfly Save Engine?
Woulda been nice if you mentioned that before.

But since you are using that, it might make it easier for me to help.

In that script, look for this line:

$game_system.on_after_load

Right under there, make a space and put this line:

$game_switches(x) = true

Making x the name of the variable you want to use.

Now, in your camp, make a parallel event that starts when that switch is on and teleports your players where you want them to go.

(This might load the camp map first.  If so, I'd have to look into other ways of doing the transfer.)

Let me know if this helps.
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
Woulda been nice if you mentioned that before.

But since you are using that, it might make it easier for me to help.

In that script, look for this line:

$game_system.on_after_load

Right under there, make a space and put this line:

$game_switches(x) = true

Making x the name of the variable you want to use.

Now, in your camp, make a parallel event that starts when that switch is on and teleports your players where you want them to go.

(This might load the camp map first.  If so, I'd have to look into other ways of doing the transfer.)

Let me know if this helps.
Or just use my suggestion, and be done with it :)  (There's no reason to keep screwing with a script, to try and get it to work as intended)
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
That's fine if it works for the OP.

I was just providing what I would do.

Just a note tho: My method would allow the player to continue to play on the camp map after the save.

Unless I misunderstand your method, it would transport the player back to the map right after the save was done, yes?
 

Zoltor

Veteran
Veteran
Joined
Jan 18, 2014
Messages
1,550
Reaction score
211
First Language
English
Primarily Uses
That's fine if it works for the OP.

I was just providing what I would do.

Just a note tho: My method would allow the player to continue to play on the camp map after the save.

Unless I misunderstand your method, it would transport the player back to the map right after the save was done, yes?
Yea it wouldn't allow continuing play on the map, "after" saving. Although if you want the player to beable to move/do things freely on the camp map, you can always make the initial save prompt event, a action button triggered event instead of autorun. This way the char can do whatever on the camp map beforehand, and then when ready to save/leave the map, hit the action button to trigger the event)
 

shftatsix

Villager
Member
Joined
Jun 27, 2014
Messages
10
Reaction score
5
First Language
English
Primarily Uses
Awesome! Thank you both, I'll try out both methods when I get home and see which one feels more natural to the play style. Much appreciated!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top