Hi all,
I'm trying to figure out the simplest means in which I can get a player to move to a contiguous tile that allows passage, when their X and Y coordinates could be at almost anywhere on the map that they're allowed to walk.
This would be executed via some kind of event (or events), ideally a single common event.
Whichever way they're facing, I would like them to try 2 steps backward if possible, 1 if that's not possible, and then go into more options if neither of those are achieved (like, forward stepping, or stepping to the left or right).
If one step backwards is successful as mentioned, I would like to try for another one before looking at those other options.
This needs to account for other events on the map that the player can't walk through.
Thanks!
EDIT: I'm looking for a solution that doesn't use regions, just because the map is already loaded with a bunch of them for other systems in place. Also, because this is a method I wish to use widely throughout the game, it would be impractical to go through every map required and double-handle the walk-able tiles by putting regions over the top of them.
Iam not sure if i correctly understand your problem, but here maybe a workaround.
Before you Teleport to this Map, Fade your Screen out manualy, than teleport without fade, to any position on that map.
Now on that map you got an Parallel Event, its Eventpagecode is:
Teleport Player without fade to the wanted position on this map, than manualy fade in the screen again than Eventcommand Erase Event (Thatway its deleted until map is reentered)
If this isnt working for you, than a different solution with position checks and more is needed.
Yes of course making the player "through On" and speed up, moving him while screen is faded out and check after every step if the tile he is on
is passable or not. than turn through off and fade screen in and reduce speed again and or teleport back to other map. (Atleast in Theory =))
if you want to do this manually for some reason, you need to use the command "get location info" on the tile you want to check for passability or anything else.
However this approach is tedious, so it would be better if you tell us what you want to do instead of how you want to do it. (description of a mechanic is how to do, description of what the player should experience ingame is what to do)
Why dont you teleport them back to the Map Coordinate/Place where the Battle got triggered?
Do i get this correctly?
1. You trigger a Fight on the Game Map.
2. You than initiate a standard Battle.
3. Afterwards the Player is standing again on the Map tile where the battle got triggered.
4. What is the problem? does the battle restart all the time? can't the player move away from that event/Region?
I dont understand what happens which should not, and i dont understand what is not happening but should happen.
Also dont jump on Regions, Events and promptations at once, let us struggle with one of them at a time, so we are able to understand the problem.
Big Guess: To escape From Events which triggered a Battle.
Activate a Selfswitch after battle, that selfswitch is pagecondition for higher numbered parallel Eventpage.
Mark through if Event shall be passable for that period of time
Eventcode: Wait 300Frames , turn self switch A Off again.
---------------------------------------
So after each battle the Enemy will blink and be passable for 5 seconds and dont trigger a new fight, so the player can safely walk away from it without retriggering it. (That would be into the direction what andar was asking for)
So, please give more details, help us to help you.
2 problems here.
1) There is not a specific tile in which a battle can be triggered. Events run toward the player, and the battle triggers when they touch. So warping then to where the battle started is a problem in itself.
2) Enemies stepping backward from the player is not the dynamic I’m trying to achieve. Yes, I could make the events step backward and for the player to walk past them, but that would defeat the purpose of an enemy guarding an area that the player cannot pass until they are defeated.
Going back to my original question - I’ve looked into getting the player X and Y’s position, but I don’t know how to check if a tile is passable. Any thoughts on that, anyone?
Thanks!
to2: I didnt said one word about events making a step backward in my last post.
to1: it doesnt matter from where the battle got initiated,because after a standard battle, the player will automatically be teleported back to the point where the battle started.
I cant get any useful information out of your answers to my questions, thatway i can't do anything for you.
Have a nice Day.
Thread closed IgnoreMeProblem reported as Solved by the OP.