After Load Event

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Presenting 2 scripts here:

[1] Is from a request here, allowing developers to control how event continue to run after save/load using a conditional branch & switch.

[2] Is a way to abort any running events as soon as the game loaded from a request here. (It's originally meant for a hot fix as shown in that request)

Since both scripts are useful and pretty high on demand, i am putting them both here.

Features:

[1] A way to control how the event continue to run after mid-save and loading.

[2] A permanent way to abort event right after loading.

How to Use:

For script 1:

[1] Set up the Switch you with to use in the script

[2] Turn on the Switch before SAVE

[3] Conditional Branch after calling SAVE in an event to check if the switch is On/Off

[4] Switch is automatically turned off after load so the event can run the Off condition after loading.

For script 2:

[1] Plug & Play, will automatically abort any running  events after loading.

Warning note: This script will disable the design of continuous battle/story-line in between event saves.

*Only choose to use one of the above script in a single game project.

Compatibility:

Both scripts should work fine along with other custom scripts. Unless a custom script placed below them is using an overwrite method. When that happens, simply move this script below that custom script will do.

Terms of Use:

Free for use in both Commercial & Non-commercial projects.

Script 1: Event after load Controlled by Switch

#==============================================================================# ■ Meow Face After Load Switch#------------------------------------------------------------------------------# Author: Meow Face#==============================================================================# How to Use:# [1] Set switch to true before save# [2] Run conditional check on switch true/false, if true, continue the event, if false abort the event# [3] Load the game and try, the switch will be automatically turn off every time you load the game.#==============================================================================module MeowFaceAfterLoad#==============================================================================# Settings Area#==============================================================================    SWITCH1 = 1 #Switch number to use  SWITCH2 = 2 #Switch number to use (Set to 0 if not used)  #==============================================================================# End of Settings Area# Edit anything past this line at your own risk#==============================================================================endclass Scene_Load < Scene_File  alias mf_load on_load_success  def on_load_success    $game_switches[MeowFaceAfterLoad::SWITCH1] = false    $game_switches[MeowFaceAfterLoad::SWITCH2] = false    mf_load  endend
Script 2: Abort all events after Load

Code:
#==============================================================================# ■ Meow Face Abort Events after Load (Hot-Fix)#------------------------------------------------------------------------------# Abort all running events after loading#==============================================================================# How to Use:# Plug & Play, Put this script below Material and above Main#==============================================================================class Game_Interpreter  attr_reader   :list  attr_accessor   :indexendclass Scene_Load < Scene_File  alias meowface_load on_load_success  def on_load_success    meowface_load    $game_map.interpreter.index = $game_map.interpreter.list.size  endend
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
Alternative version until the top post messed up code is fixed:


After Load Switch:


#==============================================================================
# ■ Meow Face After Load
#------------------------------------------------------------------------------
# Author: Meow Face
#==============================================================================
# How to Use:
# [1] Set switch to true before save
# [2] Run conditional check on switch true/false, if true, continue the event, if false abort the event
# [3] Load the game and try, the switch will be automatically turn off every time you load the game.
#==============================================================================

module MeowFaceAfterLoad

#==============================================================================
# Settings Area
#==============================================================================

SWITCH1 = 1 #Switch number to use
SWITCH2 = 2 #Switch number to use

#==============================================================================
# End of Settings Area
# Edit anything past this line at your own risk
#==============================================================================

end

class Scene_Load < Scene_File
alias mf_load on_load_success
def on_load_success
$game_switches[MeowFaceAfterLoad::SWITCH1] = false
$game_switches[MeowFaceAfterLoad::SWITCH2] = false
mf_load
end
end




After Load Event Termination:

Code:
#==============================================================================
# ■ Meow Face Abort Events after Load (Hot-Fix)
#------------------------------------------------------------------------------
# Abort all running events after loading
#==============================================================================
# How to Use:
# Plug & Play, Put this script below Material and above Main
#==============================================================================
class Game_Interpreter
  attr_reader   :list
  attr_accessor   :index
end
class Scene_Load < Scene_File
  alias meowface_load on_load_success
  def on_load_success
    meowface_load
    $game_map.interpreter.index = $game_map.interpreter.list.size
  end
end
 
Last edited by a moderator:

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,977
Members
137,563
Latest member
cexojow
Top