End an event when save file loaded.

Status
Not open for further replies.

Hellshrekers

Warper
Member
Joined
Apr 8, 2014
Messages
4
Reaction score
1
First Language
English
Primarily Uses
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
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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
 
Last edited by a moderator:

Hellshrekers

Warper
Member
Joined
Apr 8, 2014
Messages
4
Reaction score
1
First Language
English
Primarily Uses
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.
 

Hellshrekers

Warper
Member
Joined
Apr 8, 2014
Messages
4
Reaction score
1
First Language
English
Primarily Uses
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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 :)
 
Last edited by a moderator:

Hellshrekers

Warper
Member
Joined
Apr 8, 2014
Messages
4
Reaction score
1
First Language
English
Primarily Uses
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!
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top