Possible to stop the execution of a common event during other events?

Accendor

Veteran
Veteran
Joined
Aug 24, 2015
Messages
230
Reaction score
62
First Language
german
Primarily Uses
N/A
I have a common event that updates some player stats in the background every few seconds.
I would like to pause that during the execution of other events.

I know I can simply turn of the switch that is used or it and activate it again once I am done, but this seems like a lot of work for every single interactive event I would like to put in the game.

Is there a more simply way to do this?
 

FirestormNeos

Veteran
Veteran
Joined
Jul 23, 2019
Messages
218
Reaction score
183
First Language
English
Primarily Uses
RMMV
iirc parralel process events don't run when a non-parallel-process event is running, so maybe just make the common event a parralel process, while making all the events you don't want it active during to be non-parallel process?
 

spec3

blep
Veteran
Joined
Jun 20, 2020
Messages
49
Reaction score
108
First Language
portuguese
Primarily Uses
RMMV
Maybe it's not exactly what you are looking for, but can help you figure something out.
You could use a variable gate that "locks" conditions you want to stop and only "free" them whenever you want them to be free. See spoilers for example.

common event:

Code:
things you want to run always go here
    if var a = 0
        then run whatever you want and need it to stop sometime
        var a = 1
    else
        (you could also put any other condition you want here if you want it, ignore this else if you want it to change it in the events on the map)
        var a = 0

This way you can set a lot of conditioning to your parallel events.
 

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
99
Reaction score
181
First Language
Eglish
Primarily Uses
RMVXA
I use something similar but I do it with my curse effects.
The 0051 switch (Pause Effects) will simply pause the effects of everything but the Parallel is still running. In which you can update more things during the pause.
This pause effect can be a variable.
Parallel Pro.png
 

Accendor

Veteran
Veteran
Joined
Aug 24, 2015
Messages
230
Reaction score
62
First Language
german
Primarily Uses
N/A
iirc parralel process events don't run when a non-parallel-process event is running, so maybe just make the common event a parralel process, while making all the events you don't want it active during to be non-parallel process?

They actually do. The Common event is a parallel process and while it does not actively do something DURING the event, it "stores" the event and then executes it afterwards.
E.g.:
There is a common event running ni the background that lets the main actor lose 10HP every 5 seconds.
If you now create a simple event (e.g. a text message) that is NOT a parallel process the HP will not be subtracted immediately, but accumulate in the background.
E.g. if you now let the message box open for 20 seconds, the main actor will lose 40HP as soon as you close it and the common event "ticks" the next time.
The desired result here would be of course that the next "tick" again just removes 10HP and not all that was "lost" before.

The other two suggestions are basically what I am already doing - just a little different, but it does not really change the amount of "unnecessary" work.
I mean in the end it is not really a bit problem, I was just hoping there might me an even more simple solution.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,508
Reaction score
415
First Language
German
Primarily Uses
RMMV
What the others said , but with a Scriptline used in Eventcommand.
Sadly this is for VX-Ace and some is fantasy code, someone would need to translate it:

If game message is busy?
if yes do: Fiber.yield while $game_message.busy?
else do OPs code...
 

FirestormNeos

Veteran
Veteran
Joined
Jul 23, 2019
Messages
218
Reaction score
183
First Language
English
Primarily Uses
RMMV
They actually do. The Common event is a parallel process and while it does not actively do something DURING the event, it "stores" the event and then executes it afterwards.
E.g.:
There is a common event running in the background that lets the main actor lose 10HP every 5 seconds.
If you now create a simple event (e.g. a text message) that is NOT a parallel process the HP will not be subtracted immediately, but accumulate in the background.
E.g. if you now let the message box open for 20 seconds, the main actor will lose 40HP as soon as you close it and the common event "ticks" the next time.
The desired result here would be of course that the next "tick" again just removes 10HP and not all that was "lost" before.

oh. glad i figured that out now, or playtesting would've been... yikes.
 

Latest Threads

Latest Posts

Latest Profile Posts

I love editing things .
16b6a8abb5d27bf617d9b802cd5b868a.jpg

* Wall frames made with pencil photo and program photos, * Leaf and Pot, with cliché ideas of flowers
*bear on top of the closet belonging to the art of whtdragon lol.
No better feeling than part of a project just clicking into place without a single issue.
Been playing through Skies of Arcadia again, and it really makes me wanna see someone try to implement how ship battles were done in the game into RPG Maker (or really just in general).
split.png
split view of both versions of the pocket city you traverse through. there's differences like areas only being accessible in one version of Autumn Bay. or events that only happen in one or the other.

Forum statistics

Threads
118,438
Messages
1,115,982
Members
155,402
Latest member
Bansher
Top