Post above main.
It's a bit of a Macgyver, but it should do the trick.
#-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
# Save/End Menu
# Menu with only the save and end options.
#-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
@background = Spriteset_Map.new
# Make command window
s0 = "Save Game"
s1 = "End Game"
@command_window = Window_Command.new(160, [s0, s1])
@command_window.x = 236
@command_window.y = 206
@command_window.index = @menu_index
# If number of party members is 0
if $game_party.actors.size == 0
# Disable items, skills, equipment, and status
@command_window.disable_item(0)
@command_window.disable_item(1)
end
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(1)
end
# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 36
@playtime_window.y = 206
# Make steps window
@steps_window = Window_Steps.new
@steps_window.x = 436
@steps_window.y = 206
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@background.dispose
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
end
def update
# Update windows
@background.update
@command_window.update
@playtime_window.update
@steps_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
# If status window is active: call update_status
if @status_window.active
update_status
return
end
end
def update_command
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If command other than save or end game, and party members = 0
if $game_party.actors.size <= 0 and @command_window.index < 0
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Branch by command window cursor position
case @command_window.index
when 0 # save
# If saving is forbidden
if $game_system.save_disabled
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to save screen
$scene = Scene_Save.new
when 1 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
end
return
end
end
end
class Scene_Save < Scene_File
def initialize
super("Which file would you like to save to?")
end
def on_decision(filename)
# Play save SE
$game_system.se_play($data_system.save_se)
# Write save data
file = File.open(filename, "wb")
write_save_data(file)
file.close
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(0)
end
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(0)
end
def write_save_data(file)
# Make character data for drawing save file
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
characters.push([actor.character_name, actor.character_hue])
end
# Write character data for drawing save file
Marshal.dump(characters, file)
# Wrire frame count for measuring play time
Marshal.dump(Graphics.frame_count, file)
# Increase save count by 1
$game_system.save_count += 1
# Save magic number
# (A random value will be written each time saving with editor)
$game_system.magic_number = $data_system.magic_number
# Write each type of game object
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
end
end
class Scene_End
def main
@background = Spriteset_Map.new
# Make command window
s1 = "Restart"
s2 = "Shutdown"
s3 = "Continue"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame Update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of window
@background.dispose
@command_window.dispose
# If switching to title screen
if $scene.is_a?(Scene_Title)
# Fade out screen
Graphics.transition
Graphics.freeze
end
end
def update
# Update command window
@background.update
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to menu screen
$scene = Scene_Menu.new(1)
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # to title
command_to_title
when 1 # shutdown
command_shutdown
when 2 # quit
command_cancel
end
return
end
end
def command_to_title
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Switch to title screen
$scene = Scene_Title.new
end
def command_shutdown
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Fade out BGM, BGS, and ME
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# Shutdown
$scene = nil
end
def command_cancel
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to menu screen
$scene = Scene_Menu.new(1)
end
end
Since there are probably many people that will look at this thread, I'll share a really easy way to fix this. EVENT ONLY. Note: It only works for events that dont move around. For ones that do move around, it can work, just way way way harder, but I wont mention it here.
Make an Event. Set the Autonomous Movement to Custom. Set Frequency to Highest. Click on "Move Route ..." just beow the Automous Movement type. Uncheck Repeat Action in Options. Click on "Script", then put this script snippet into the Script box.
@trigger = -1
That will STOP the player from being able to interact with that Event, period.
It doesnt need additional pages and allows graphics for that event to be displayed. What happens is with your Trigger types, the Triggers either have some form of Player interaction, or they Autorun. Setting the Trigger to -1 prevents any form of making the event do its evented stuff.
Now, to make the Non Interactive Event do everything in the list of Event Commands, it needs to be fired from another external Event Script:
$game_map.events[12].start
When that code is run from another Event, the Commands in that events List of Event Commands will fire. It works a lot like "Call Common Event", but only on that particular map. Just dont forget to change 12 to the actual Event ID of that Event you want to Trigger.