Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
Is there a way to make all events stop working while a certain switch or code is activated? Must be able to turn on and off. (Need Common Events to work at this time)
module PauseEvents
Switch_ID = 1
end
class Game_Event
alias_method :seph_pauseevent_gmevt_update, :update
def update
return if $game_switches[PauseEvents::Switch_ID]
seph_pauseevent_gmevt_update
end
end
Insert below all your other scripts. Then to pause events, setting your switch to On.
module PauseEvents
Switch_ID = 1
end
class Game_Event
alias_method :seph_pauseevent_gmevt_update, :update
def update
return if $game_switches[PauseEvents::Switch_ID]
seph_pauseevent_gmevt_update
end
alias_method :seph_pauseevent_gmevt_start, :start
def start
return if $game_switches[PauseEvents::Switch_ID]
seph_pauseevent_gmevt_start
end
end