I want an event that triggers if below the player, but if the player is facing the correct direction. As is, it only triggers if the player is facing the direction when the player enters the space, which requires entering the space from the one specific side.
I would prefer not to have a parallel event constantly running to check player position and facing to achieve this, as it's already a big map and I'm worried about performance issues if I get too complicated. Is there system resource light method of doing this?Best I can come up with is a parallel event that starts running when the player steps on the player touch event, and stops if they move to an adjacent square.
Well doesn't it have to be a parallel event if you want it to keep running after the player has already entered the square?
So like you can have the event on player touch to flip a self switch to a parallel event page which checks player direction in a conditional and also checks player coordinates and turns the self switch off (back to the player touch page) if player coordinates aren't the same as the event coordinates. But maybe that's what you already had?
I figured something out with lots of switches.
It goes like, event 1 turns turns on event 2 which is collision trigger, that way if the player tries to move towards the collision trigger it always triggers regardless of where the player is standing. Once event 2 triggers it moves to page 3, disables collision, and moves the player onto that space, causing event 1 to have collision trigger on, so if the player tries to move back towards event 1 it turns off event 1 collision and moves the player back on to event 1, setting event 2 to page2/collision trigger on. If the player moves away from event 1, everything resets.
It's a little ugly because the movement isn't fluid, but it gets the job done.
All this so my character can both walk under and over a ladder. There's probably a better way to do this lol.
Well what I've got with the switches works. If I could smooth out the movement choppiness that comes with setting movement routes that'd be peak, and using a parallel event to track player position would allow for that, however it runs into an issue where I'm using through to get through the sides of the ladder which are otherwise impassable, and would let the player walk on the wall for one step before it sets through back to off.
Maybe if I let the ladder be fully passable and used a parallel event to trigger the through status of events used as walls rather than having it be set on the tileset I could fix the movement choppiness...
Actually if I did away with the parallel event I could just have a switch at the bottom of the ladder that triggers the ladder walls on or off in the passable section and sets the passable ladder section to "above" instead of below... but doing that would add like 50 events to what's already going to be a large map... Maybe if I had a set of walls that get moved around as the player traverses the map I could do with like 12 blocks that switch position based on where the player is on the map and reduce the number of wall blocks I need.
I think you're overthinking the required code.
how about doing it this way:
have the event below player and on action trigger, then check the player facing with a conditional branch.
if the player is facing the correct direction, proceed the event otherwise abort the event.
depending on exactly what you want you can use that facing check in different ways, but internally you always trigger and just abort if the trigger is on the wrong facing
So what I want is to seamlessly walk under a ladder that can also be climbed, action trigger doesn't do that, and player touch trigger only triggers when stepping on the event, so if the player isn't facing the right direction when they step on the event, it doesn't trigger, which is why I wanted a way to trigger a touch trigger on player turning.
On a positive note, I got the ladder system working flawlessly, and it only took 25 extra events (16 of which can be re-used for other purposes)😅
If the map ends up with performance issues I might be able to optimize it later, I sure hope so.
I have just come to the extremely obvious realization that I do not need to put blocks along the entire side of the ladder, only the spaces where the player could otherwise walk because the tileset will do most of the blocking for me and I used way too many events for this, where is the facepalm emoji.