How to make the touch event work after touching it

Well first off, Hello! I am new to this rpg maker thing and after a few hours of using the program I ran into a problem which is really hard to explain so google search isn't exactly useful for this issue, so i figured I'd start to use the forums. Anyway my problem is this I'm trying to make an event that transitions between maps, I only want the map to change if I stand on the event while facing a certain direction since I'm trying to make the transition occur once the player hits the right side of the map, I managed to make a condition for this so it isn't the problem.The issue is that I have to hit the event while facing right if I hit the event and then turn right it doesn't work so if I transfer maps and decide I want to go back I have to leave the event tile and reenter it while facing the appropriate direction. Its pretty hard to explain with words actually so I drew this really cool picture in paint to help explain it (it probably won't help). So that's pretty much it thanks for any help in advance


SDAD.png
So, you want the event to only trigger when you walk on it while facing a particular direction ?
Can you give a screenshot of your event?


You might also have a problem with the trigger choosen, "event touch" requires the event to move on the player to be triggered, but I can't really say which touch trigger you've used from your description.


And "player touch" with "below player" works only when the player moves on the event - turning while standing on it will not trigger.
Can you give a screenshot of your event?


You might also have a problem with the trigger choosen, "event touch" requires the event to move on the player to be triggered, but I can't really say which touch trigger you've used from your description.


And "player touch" with "below player" works only when the player moves on the event - turning while standing on it will not trigger.



Here's the screenshot you requested event.png


Is there a way to make it trigger if I turn while standing on it? You actually did a pretty damn good job of summarizing what I wanted to do I can't believe I didn't think of wording it like that.
As I said above, you need to change the trigger from "event touch" to "player touch" - that event will never trigger as it is now, because it doesn't move and the event touch requires the event to move on the player to trigger.
I'm not seeing a difference It still only triggers if I enter the tile from the left side since my character is facing right. I seem to be getting the same result whether or not I use event touch or player touch
I think you need the push button script command. I can't explain it now but I will try to help you once I can use my PC.
I'm not seeing a difference It still only triggers if I enter the tile from the left side since my character is facing right.



Of course you do.


As I said above, there is no trigger that reacts to turning. You need to move in order to trigger an event, turning is not enough.


That is why most maps are made in a way that the player needs to enter the transfer from the right direction, either by using obstacles or by using a row of events that trigger on moving to the map edge.


You cannot trigger anything by turning alone - it would need a change to the engine (requiring a plugin) to change that, and changing the event triggers in such a way will risk incompatibilities and problems with a lot of other functions, so I suggest against that route.
As I said above, you need to change the trigger from "event touch" to "player touch" - that event will never trigger as it is now, because it doesn't move and the event touch requires the event to move on the player to trigger.

Andar what are you talking about? I believe you accidentally got something wrong.


Action Button = Space Button


Paralell = Paralell


Autorun = Paralell + Player cant move with arrow keys


Player touch = Event is activated if the player runs against that event, not if the event runs against the player


Event touch = Event is activated if the player runs against it or if the event runs against the player.


You are right with the setting "on below"it than only triggers if player runs ontop of it.


To Topic:


1st Solution


Change your Map design to solve this.


or


2nd Solution


U could use 1Paralell Event and Regions to keep the current mapping and to solve your teleport bug with Eventing.
You cannot trigger anything by turning alone - it would need a change to the engine (requiring a plugin) to change that, and changing the event triggers in such a way will risk incompatibilities and problems with a lot of other functions, so I suggest against that route.



Well I guess I'll just have to work around it, thanks for the help tho really appreciate it

I think you need the push button script command. I can't explain it now but I will try to help you once I can use my PC.



Thanks for the offer, but I'd rather not use a script to do this considering Its only a minor issue I have and just working around it would be a lot easier.
Well I guess I'll just have to work around it, thanks for the help tho really appreciate it


Thanks for the offer, but I'd rather not use a script to do this considering Its only a minor issue I have and just working around it would be a lot easier.

Actually, I don't mean a complete script. It just a script command that you can put on an event page but if you want to use another method then it's better for you.
OK here is some pseudocode for mapteleports with regions.


Create a Paralell event.


Control Variable1 = Player MapX


Control Variable2 = Player Mapy


Get Location Info: RegionID of coordinates x = Var1 and y = Var2, set var3 to outcome.


Conditional Branch var3 = 1 (Means the Player stands on Region1)


Conditional branch Player is facing right


if yes teleport to other map.


end


end


Conditional Branch var3 = 2 (Means the Player stands on Region2)


Conditional branch Player is facing left


if yes teleport to other map.


end


And dont forget to Map the Regions on the Map. Thatway it only triggers the Teleport when facing the wanted direction,


Hope this helps.
If you do want to use a parallel process, then Bex forgot the most important command - add a wait(10) after all those commands, otherwise you'll get a lot of lag on the map (which is also why I didn't suggest that solution)
Ahh, I know this issue. It's been an issue with all of the RPG Makers. I only know the solution in VX and Ace, because I don't know the script for "$game_player.moving?" in MV.


Basically, in your transfer event, you should have it set to player touch, and turn on self switch A. Create a new event page, with its condition set to Self Switch A is ON, set to parallel process. In this event page, you create a conditional branch with the $game_player.moving? script (the equivalent for MV anyway), if true, turn off self switch A.


Create another conditional branch beneath the other one, and check if the player is pressing the Up/Down/Right/Left button (whichever direction the player needs to be facing to 'transfer' the map). If true, transfer the player and turn off self switch A.


This should make you have smooth transfers, that even thought he player has already triggered the event and is still standing on top of it, the event will still register whether or not you want to 'transfer'.


The drawback is that if you transfer the player to another map, and have them stand on another transfer event, this event won't get triggered by player touch. I've got a solution for this as well, if you'd like to know.
The MV equivalent is

Code:
$gamePlayer.isMoving()
If you do want to use a parallel process, then Bex forgot the most important command - add a wait(10) after all those commands, otherwise you'll get a lot of lag on the map (which is also why I didn't suggest that solution)

Yes the Wait is importand cause the eventcode does not need to be executed around 30to60times a seccond.


I forgot it, thanks its needed thistime to easy safe up some performance reserves for other stuff.


This code alone would not lag, but the paralell event would use a little bit of the available performance reserves.


Having 1Paralell Event in the Game that is clean Evented which checks for some stuff is no Problem at all.


Having a 2nd and a 3rd from time to time would also be ok if there are enough performance reserves left. In best case they turn themself of after they did what was needed.


But having more is mostly not needed and results in much lag, just cause of events being paralell.


But dont get scared to use them. Scripting, Eventing its all about iteration/looping of code.
The MV equivalent is



$gamePlayer.isMoving()



Thanks Hudell! Yes, use this in a conditional branch with the script part, and follow my instructions. Then you have a transfer that works even though the player already activated the event.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-the-touch-event-work-after-touching-it.63265/