Envision, Create, Share

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.

[Resolved] Event Stop

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)

For RMXP
 
Code:
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.
 
Try replacing the script with this:
Code:
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
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top