I copied this event. Moved it to another location. When that didn't work. I also made a new event from scratch. For the last hour, Google AI has been gaslighting me. Where it keeps telling me to look for features that don't exist. I have TheoAllen - Pathfinding https://raw.githubusercontent.com/theoallen/RGSS3/master/Pathfinding (ENG).rb and Yanfly Engine Ace - Move Restrict Region https://github.com/Archeia/YEARepo/blob/master/Field/Move_Restrict_Region.rb
VXAce I'm trying to figure out why a simple patrol pattern is going crazy
RPG Maker VXAce Supportplease show us screenshots of the event.
we can't tell what you did wrong without seeing what you did.
and what is "going crazy"?
please give a description of what is actually happening as well as a description of what is supposed to happen.
we can't tell what you did wrong without seeing what you did.
and what is "going crazy"?
please give a description of what is actually happening as well as a description of what is supposed to happen.
Instead of patrolling back and forth, it just immediately starts going off in crazy directions.
again, which direction? "crazy" is neither up, down, left or right - only those four directions exist.
then that event doesn't use pathfinding at all.
and there is a reason why I asked for a different description as "crazy":
autonomous moveroutes repeat, and not from the starting point but from the current point if something interrupts them.
so if the path is blocked somewhere (either by tile or by region code), the path might result in the event wandering away up or down farther than it needs to.
Because those are the only move commands in the route.
if however the event goes left or right, then your engine is broken somewhere in the script editor.
then that event doesn't use pathfinding at all.
and there is a reason why I asked for a different description as "crazy":
autonomous moveroutes repeat, and not from the starting point but from the current point if something interrupts them.
so if the path is blocked somewhere (either by tile or by region code), the path might result in the event wandering away up or down farther than it needs to.
Because those are the only move commands in the route.
if however the event goes left or right, then your engine is broken somewhere in the script editor.
No, it was going diagonally. You know how a toddler gets a crayon and starts scribbling on the wall? Like that. I checked the tiles. I even paved over the original tile with the same tile. To make sure there weren't any unseen obstacles in the way. I check the region code. I have it set so it only blocks the player. And the other events pass through the region without incident. There are no events in the way. I didn't even touch it before it went haywire. At least until it hits an object. I have two identical ones that work fine. I also have this snippet that someone here made for me. Update: I moved the event to a different part of the map, and it works fine.
The engine itself supports diagonal movement, it just doesn't use it on its own.
which means that this could for example be caused by some script that messes with the direction numbers - by default only 2,4,6,8 are used iirc but if something switches or enables 1,3,5,7 then those are diagonals.
What is that snippet supposed to do? And where did you get it from?
which means that this could for example be caused by some script that messes with the direction numbers - by default only 2,4,6,8 are used iirc but if something switches or enables 1,3,5,7 then those are diagonals.
What is that snippet supposed to do? And where did you get it from?
Probably the TheoAllen script, try disabling that to isolate if its the cause or not. Even if it is then try disabling the other two to check for incompatibilities with the pathfinding script.
My guess is some passable? false tiles(you checked for this)/data(I think this is what your YEA script does) are in that area interfering with the moveroute.
My guess is some passable? false tiles(you checked for this)/data(I think this is what your YEA script does) are in that area interfering with the moveroute.
Also with the direction FIX,
You don't need to apply it if your character "face down," then "move down as "moving down" auto maticly makes it face down.
You only want to use "Direction Fix" if you want your character to move whilst not facing the direction it's moving.
You don't need to apply it if your character "face down," then "move down as "moving down" auto maticly makes it face down.
You only want to use "Direction Fix" if you want your character to move whilst not facing the direction it's moving.
It's supposed to stop NPCs from blocking each other. I think the snippet was given to me by Roninator2.
How do you disable a script? Yep. Made sure they had 'o' not x'. I check the passage for 4 dir, etc.
Well, the player isn't supposed to be able to interact with them. So that's why I have it set to direct fix. They ignore the player.
there is a keyboard shortcut for a command to automatically comment out all lines of a script slot.
but I don't remember it and don't have VXA installed either.
check for it in the context/right-click menu of the script editor, for example when right-clicking on the script name in the list to the left.
remember that you will require a new playtest as changes to the engine make savefiles incompatible most of the time
I found the problem. It was the Region ID. Even though I had <player block: 10> under map property notes, it was still affecting the enemies. While I had <Event block: 63>. So I changed it to <player block: 2>, and now they are working normally.
Ctrl+A to highlight the whole script then,
Ctrl+Q to comment out the whole script.
Same method to re-enable the script.
ok, thanks.
Original thread: https://forums.rpgmakerweb.com/threads/im-trying-to-figure-out-why-a-simple-patrol-pattern-is-going-crazy.182514/