Is this the best way to stop my parallel process?

I have a parallel process to hide a tile if the player happens to explore a certain map too early. After the player has gone through this part of the game, it goes to a blank event page permanently. But until that part of the game, I do want the process to run every time they enter the map. However, since it's specific to this map, I don't want the process to be running foreeeever while the player isn't even on the map.


The process checks for game progress, changes the graphic to a normal wall tile if it needs to be hidden, and then exits event processing. I didn't ask it to "erase event" because I don't want it to erase the event's graphic. But does "exit event processing" save me from having my parallel process run forever and take up memory, or do I have to "erase event" in order to keep it from doing that? 


hideladder (1).png


This is what I have so far.


hideladder (2).png


I hid the ladder, because there be cut scenes on them thar ledges. 


hideladder (3).png


And here's after the plot lets us go down there.


Thanks for the help. I'm only just starting to understand erase event vs. exit event processing, and while I got the basic difference down, I'm still working out when it's okay to use which...
While what you have works, why not do this:


Page 1: Set to action button, below player, direction fix (so the ladder doesn't change graphics if someone hits space while on it), and condition is variable 003 is > 5, and give it the ladder graphic? That way you don't even need a parallel process at all, and the ladder still shows up only when the plot says to go there.
Just for your information. Erase event does not mean that you lose your graphic.  It simply means that your parallel process won't run again until the next time you enter that map.  Useful for all sorts of things including screen tints, bgms, anything you might want to run to set up the map in a particular way.
While what you have works, why not do this:


Page 1: Set to action button, below player, direction fix (so the ladder doesn't change graphics if someone hits space while on it), and condition is variable 003 is > 5, and give it the ladder graphic? That way you don't even need a parallel process at all, and the ladder still shows up only when the plot says to go there.



The reason I didn't is that the condition is not just when 003 is > 5. There's a more complex conditional there with multiple variables, and the eventing "conditions" area only allows you to specify one variable. The fact that it turns off permanently when 003 > 5 is that I was lazy about when I'd get around to turning it off permanently, but it also needs to reveal the ladder if 003 == 5 and (I forget its number) >= 3. The concealment tile needs to stay on if 003 <= 5 and whatsitsnumber < 3. I can't specify that when telling the event whether or not to run-- I can only get it to check a more complex conditional once it is already triggered to run.


Also, I have to make it the cover-up tile rather than the ladder because the eventing conditions only let you set it to run when the variable is greater-- not lesser. I wish it would let you specify that, because it would be so much less work if I didn't have to make cover-ups for things that are supposed to be gone later rather than earlier.


Anyway! Thank you guys for the information! I will probably leave it as is, since it won't cause efficiency problems for the player. 🙂
The problem with using a parallel process event is that it will ALWAYS be running. Exit Event Processing doesn't do what you think it does.  It simply puts the "command pointer" at the end of all the commands.  And because this is a parallel process event, it will then go to the top of the list and do it all over again.  To verify this, add a Show Text command just before your Move Route, and see that it continually pops up the text when the condition is met - doesn't do it just once and leave it at that.  So yeah, it's always running while you're on the map, and it might cause efficiency problems for the player.


What can change those variables?  Can they change while you're on this map?  Can the ladder NOT be there, and then appear while you're on the map?  Or can it be there, and then disappear while you're on the map?  Or do all of the variables used in the conditions get changed elsewhere - on other maps?  If they all get changed on other maps, have two events.  One will have the graphics that you want to show or not show, and the other will have the logic that determines whether it will show or not.  On the event with the graphic, have no conditions on the first page, and a switch as a condition on the second page.  This switch will be turned on when your 'special' conditions are met.  Both will just be left as action button trigger.  Now on the other event, have a single page, set to parallel process.  It will do the conditional branch to determine whether the 'special' conditions are met - if they are, turn the switch on; if they're not, turn it off.  At the end of the event, use an Erase Event command.


This means, when the map is loaded, it will do a quick check to determine what graphic should be on the other event, set a switch accordingly, and erase itself, so it's not constantly running while you're on the map.
@Violet: That makes some sense, but I'm still worried about lag, for the reasons Shaz mentioned. If the ladder is revealed at a point in the plot, you could turn on a switch when that point is reached, or use a variable to track plot progression, and then do a if that variable is >= x, show the ladder. After all, the variable for the plot *should* be always increasing (unless players can go backwards in the story!) so should not matter.


As for how to do less than, there's a cute way around that. Put the event you want to run on page 1, no conditions, then make page 2 the turn if off page that runs when that variable is >= x. Then it only runs when the variable is < the value you put on page 2.
This means, when the map is loaded, it will do a quick check to determine what graphic should be on the other event, set a switch accordingly, and erase itself, so it's not constantly running while you're on the map.



Yeah, they can never change on this map. So... even if the map has already loaded and the event has decided it should run the first page, if the switch gets changed, then the event will still change pages immediately, rather than just stay on the first page until the map gets reloaded? I worry that if the events choose what page they should be on *first*, before the parallel process changes the switch, and the events are set to action button, then the events would just sit there inert, not realizing that they should be on a different page.

As for how to do less than, there's a cute way around that. Put the event you want to run on page 1, no conditions, then make page 2 the turn if off page that runs when that variable is >= x. Then it only runs when the variable is < the value you put on page 2.

Oh... man. I've got it in my head so much that later pages are typically going to run later, I didn't think of that. (I'm not sure why they didn't just let us select it from a drop-down.)


Still, needing to check for two variables is a thing I really wish we could just check for on a page condition. A single plot tracker won't cover it. For one thing, I have two variables tracking plot, one that tracks what overall quest you're doing and one that tracks progress through it, and the latter does reset for each quest. I'm super glad I did it that way because it's so much easier to add or shuffle things within just the single quest. It would have been a nightmare so far if I'd just used a single one. But it means that in this situation, where it really does have to switch graphics in the middle of a quest, they do both have to be checked.


And thank you guys for the help! 🙂
Events change pages when the conditions against the pages change.  If a switch is changed by the parallel process, all events will be checked again to see if they should be on a different page.
Oh, that is awesome. I think I'll try it the way you suggested, then. Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/is-this-the-best-way-to-stop-my-parallel-process.67582/