Game Switch turns off when Message or Menu is displayed

YvetteJene

Veteran
Veteran
Joined
Dec 31, 2015
Messages
15
Reaction score
13
First Language
English
Hello! I have scoured the internet for something like what I am looking for. I evented a time system that runs on one Switch, (switch 1,) and when it is turned off, time stops momentarily.

I would, however, like time to stop automatically when either the default menu or conversational messages appear on the screen.
 
I COULD do this by eventing, by putting a control switch operation before and after each NPC message, but  I could not do it for the menu, I think. I think that it would be more convenient to have one plugin do it all for the sake of my sanity.
 
I tried to Frankenstein my own plugin for what I needed by using Hudell's OrangeTimeSystem script because there is an option in it to pause time by checking if the gameMessage is "Busy." I attempted to figure out how it was done and replicate it, but to no avail.

$.isInternallyPaused = function() {
    if ($.Param.pauseClockDuringConversations === true) {
      if (SceneManager._scene instanceof Scene_Map) {
        if ($gameMessage.isBusy()) {
          return true;

        }
      }
    }

    return false;
  };
I know that if I could just figure out how to do this, I would be set. But after hours of trying to do it without any real experience with JS, I just threw my hands up.

So basically, I am asking for a plugin that checks to see  if the menu or a message window is showing, if it is, turn switch 1 OFF. If it is not (else,) to turn the switch ON.

I hope that this isn't complicated, I don't think it should be??

Please let me know if you can help! Thanks!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,431
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
Programming doesn't work that way - you'll need to turn on the switch when the command to open a scene is processed, and turn it off when the command to exit the last scene is processed and the player returns to the map. That is because in the engine, there is no parallel check for wether you're in a menu or not.

Parallel Processes in events are only looking simple from the eventing side, replicating them in the engine's game loop by scripting is not easy, that's why you have to enter the commands in the places described above.

I also suggest that you change the used switch - ID#1 is a default for a lot of settings, and if you forget to change that and have it used somewhere, you'll have one hell of a bughunt (for example if turning a common event to parallel process or autorun, the default switch is #1)
 

YvetteJene

Veteran
Veteran
Joined
Dec 31, 2015
Messages
15
Reaction score
13
First Language
English
Oh, I see, that makes sense. I can easily change the Time Switch to something else. I could also use a conditional branch in the time common event to check if the Switch is Off instead of On, instead, to make time run. Would that make things easier?

Thanks for answering~!
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,467
Members
137,821
Latest member
Capterson
Top