Multiple events or parallel process variables?

One of the first dungeons I ever made was a very narrow, cramped space, only one square wide to walk through, with a spotlight effect so you could only ever see a few squares in front of you. Using Yanfly's gab script, I set "player touch" events that would carry on a conversation as you worked your way through the maze.

Later, I designed a more open dungeon, but wanted to continue having those conversations. However, I didn't want to force players through one-square chokepoints just to have more conversations, but I certainly didn't want to create multiple copies of the same event that all have switches to turn the other copies off once that part of the conversation happened.

I ended up creating a parallel process that either tracked the player's x-coordinate, y-coordinate, or both (the difference being if you would only pass that coordinate in one place on the map or several), and simply executed the gab script once they reached a certain coordinate, using self-switches to ensure a linear progression of conversation.

Then I thought, "You know, I could do this same thing with town exits." Instead of creating multiple copies of "transfer player" events and lining them like a wall around the outside edges of a map, I could just run a parallel process on that map that tracked where they were and exit once they got to a certain point.

However, I was wondering if one has an advantage over the other. Do you think there are times that it's better to simply create multiple events (not just with exits, but with any kind of event at all)? Let's say you have a map with an enclosed entrance/exit (say, a house with a double-door, so that's the only way in or out). Do you think it would be better to create two transfer player events with a player touch trigger, or a single event that's a parallel process that simply tracks the player's Y-coordinate, transferring them once they got to either of the door's Y-coordinates?
Both methods have their good points and bad points.


A parallel process event is running continually, always checking the player's location, so would use a small amount of CPU resources for the entire time on that map. However, multiple events, even though they're not processing continually, are always being checked by the map script, to see if they DO have something that needs to be processed.


I suppose the point where you say one method is better than the other would depend on how many of these events you needed on a given map.


I made a large collision script for someone who had a similar need, and I've tweaked it quite a bit since for my own use. What you're describing is exactly what I use it for - events without graphics that just sit on the map waiting for the player to walk over them.

Original thread: https://forums.rpgmakerweb.com/threads/multiple-events-or-parallel-process-variables.16936/