End an event when save file loaded.

Hello,

I have made a save file manager to replace the built in menu, and it has some text after you save that I don't want the player to see again after he/she loads the game. Is there a way to jump to a different part of the event upon loading of the save game or just simply end the event upon saving?

Here is my current code and what I need:

1.PNG
Why do you have the commands in there if you don't want them run?


Can you just set a switch prior to saving at that point, then have a new page conditioned by the switch?
You can achieve that by messing with scripts a bit


Like have a conditional branch there that uses a switch as a condition, such that if that switch is ON, you skip to a label at the end and switch it again to off


now everytime you load a file, you will set that switch to ON by adding a line for that on the loading method of DataManage


r


or you can make those parts run only upon saving via making the saving method of DataManager run them instead of by the event but that will be more complicated


@Shaz - he wants it to run when he saves, he wants it to not run if he loads that save file... basically he wants some kind of message to show after you save, but since he uses events, if he loads the file from that point, the save message will still pop-up which then makes it weird
You can achieve that by messing with scripts a bit

Like have a conditional branch there that uses a switch as a condition, such that if that switch is ON, you skip to a label at the end and switch it again to off

now everytime you load a file, you will set that switch to ON by adding a line for that on the loading method of DataManage

r

or you can make those parts run only upon saving via making the saving method of DataManager run them instead of by the event but that will be more complicated

@Shaz - he wants it to run when he saves, he wants it to not run if he loads that save file... basically he wants some kind of message to show after you save, but since he uses events, if he loads the file from that point, the save message will still pop-up which then makes it weird
This helps me get somewhere but if I do that I would have to place the "You Saved" switch to on before the save screen so it can record it, so then I would have to place the code to turn it back off after the save menu. The game loads the switch to be on, but then after that it turns right off because it loads the even right where it left off.
Why do you have the commands in there if you don't want them run?

Can you just set a switch prior to saving at that point, then have a new page conditioned by the switch?
I want to make the game more lively. The game's method of saving is by a photobooth that "records" your adventure.
I think you've misunderstood something, you don't save the switch as ON, you just turn it ON when the game is loaded via modifying the load method


You do it like this:


Save File


Check if switch is ON


if yes: skip then switch = off


if not: show message


then to make it skip upon loading, you will edit the loading method of DataManager so that upon loading it makes it True/ON


PS: I already written out 3 times that you will edit the DataManager script (4 times now actually)... so I guess that should be enough for you to understand 🙂
I think you've misunderstood something, you don't save the switch as ON, you just turn it ON when the game is loaded via modifying the load method

You do it like this:

Save File

Check if switch is ON

if yes: skip then switch = off

if not: show message

then to make it skip upon loading, you will edit the loading method of DataManager so that upon loading it makes it True/ON

PS: I already written out 3 times that you will edit the DataManager script (4 times now actually)... so I guess that should be enough for you to understand 🙂
Sorry for being so thick headed.

I'm not that good at Ruby so I searched online and I learned in RPG Maker the Ruby command for changing switches is "$game_switches[x] = boolean" 

I placed that line with an integer of 9 (because the "saved" switch is 0009) under the lines in the DataManager module:

 #--------------------------------------------------------------------------

  # * Execute Load

  #--------------------------------------------------------------------------

  def self.load_game(index)

    load_game_without_rescue(index) rescue false

 

So the whole byte of code was:

 #--------------------------------------------------------------------------

  # * Execute Load

  #--------------------------------------------------------------------------

  def self.load_game(index)

    load_game_without_rescue(index) rescue false

    $game_switches[9] = true

  end

And it worked!

Thank you so much!
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.

Original thread: https://forums.rpgmakerweb.com/threads/end-an-event-when-save-file-loaded.25853/