Indoor Doors, Doorway and Loop issue - trying to mix two events, both work separately

Hey there,

I'm trying to find a good system to have indoor doors in my project. I've watched many tutorials and while many were functional, I'm trying to push the limit. You see, most of the events required a ''Move Forward'' command which I don't want. I want to give my players an option to stay in the doorway if they wish.

I'm also the Dark Cover plugin, which is working totally fine, but when trying to call the plugin in the doorway, the eventing I'm doing is wrong. Let me show you with pictures.

PART 1: I'm trying to reveal the Dark Cover 250 from the following picture, while standing in the doorway, after the door opening animation.
Spoiler
Part 1.PNG

PART 2: This is the base door event I'm trying to use and fuse with the Dark Cover thing. Two pages, both are shown.

Spoiler
Part 2.PNG

Part 3.PNG

PART 3: The working hide/show Dark Cover thing. I found a tutorial explaining loop, which is what I tried to copy. Long story short, when not mixed with a door opening (aka: when it's working, occupying the only space of a doorway), if I look up, the room will show. If I look down, the room will go black. Of course it will work when I enter and leave a round. I had to add the turn right/left conditional because for some reason (I guess it's the loop?) I couldn't look either way. This works like charm on its own.

Spoiler
Part 4.PNG

PART 4: I tried to mix the Dark Cover thing and the door via Self Switch. It's a 3 part event: a door to move up like normal, the ''dark cover portal'' (just a visual help until it's working) that SHOULD show/hide the region (but doesn't), and then the last page which would be the second page of the working door event seen in Part 2.

The first page of the event seems to work properly: the character is moved up, the door change for a portal, it seems Self Switch A is activated because the portal is shown. However, despite me facing top, the room is not revealed. I thought that would be the first thing the loop checked, well, if doesn't. Either the loop isn't working for various reason (maybe because the character is moved by an event, and not by the player) or the loop is working but my conditions/events inside are wrong.

From that point, where the character is sitting on the portal in the door, it is POSSIBLE to move inside the room. However, nothing will be shown, everything is still dark. And then, when I exit the room, the door takes its place properly.

I might totally be wrong, but it feels like the loop isn't checking if the character is facing anywhere or what the character does. So for fun, I tried to put the second page in parallel process, but then anywhere in the room, if I moved top or bot, it would hide/reveal the Dark Covers. I presume a solution with a Hero XY variable could be useful but there has to be an easier solution.

Spoiler
Part 5.PNGPart 6.PNG Part 7.PNG

So what's the issue? I've been at a lost for hours now. A little bit of help would be appreciated. 🙂

Thank you very much!
First of all, on Page 2 your "Loop" is completely useless here as the trigger is Player Touch. Either you meant to set this as a parallel process or you don't need the loop. Player Touch only triggers when the button input puts the player in contact with the event, not while the player is on top of the event. I mocked up your first two event pages, and it only triggers the second page to run SOMETIMES, most likely due to a timing issue with changing the page and checking whether the player "touches" the event.

If you set the second page as a parallel process, it might work. BUT BE CAUTIOUS, as you should have the bare minimum of parallel processes running at the same time. It would probably be better to use one invisible parallel process event to control the hiding and revealing of all the areas based on player position and facing. Edit: Sorry, just reread and saw you tried this. Yes, you need to add a player position component if you're going to do it that way. Nest your facing conditional inside a player position conditional.

Another option: since you have different event pages for the door when the player is in the hallway or in the room, add a reveal or hide to those pages. They can only be triggered by entering or leaving the room, anyway.
Well, you gave me a precious knowledge on the loop not working.

I just tried something and it seems to work now. It will require more testing, but in theory, why shouldn't it? Here it goes.

1) Switch Player Touch to Parallel Process on page 2, as yo suggest

2) Instead of doing a variable for location, simply add a Self Switch when you press Up or Down, and have the rest of code intact. That way, while in the doorway, the Parallel Process will keep running, but it will stop as soon as you get out.

I haven't ''hard tested'' it, but so far it works. Should it?
Sounds valid!

Edit: to avoid lag, you might want to increase the number of frames to "wait" inside the loop. 10 is probably too unresponsive, but 3-6 seems to work pretty well for me.
Sounds valid!

Edit: to avoid lag, you might want to increase the number of frames to "wait" inside the loop. 10 is probably too unresponsive, but 3-6 seems to work pretty well for me.

Then, thank you very much. You were of a precious help! 🙂

Case is solved.

Original thread: https://forums.rpgmakerweb.com/threads/indoor-doors-doorway-and-loop-issue-trying-to-mix-two-events-both-work-separately.88478/