Block off a area for auto moving NPC's

so i have a random moving npc but i want to block him off from blocking a entrance

in ace i just did a empty event in front of the entrance and the npc wasn't walink over it

in mv this dosn't work anymore ...

other suggestions?
Yanfly has a plugin to fix this, I believe. You can use regions to stop events from going places they shouldn't, with it.

https://www.youtube.com/watch?v=KiyK_Ny4CMs
no other way? i allready use regions for stepping sounds xD

(well the workaround is to make 2 regions with the same stepping sounds and mix them)

edit: damn since you only have 1 reagion to restrict this dosn't really work
Okay, this worked for me, to keep an NPC in the left half of a map:

1) First event page of the NPC, set Autonomous Movement to 'fixed' and Trigger to 'parallel'.

2) First line of Contents, select Control Variables and set a variable to 'character', 'this event', 'map x'. This tracks the x-position of this NPC on the map.

3) Second line is a conditional branch, with an 'Else'. If the variable you set in step (2) = the x coordinate of your 'you shall not pass' line on the map, 'Move Left'. This will force the NPC to turn left each time it wanders too far to the right. Else, 'Move Random'.

That's it! Obviously, this just keeps your NPC in the left side of your map.

Note: There might be a more elegant way to do this, using switches, but this works for me.
I'm not sure that I would advocate using parallel processes unnecessarily.  They can so easily turn into lag.

Another option - Galv has ported his nifty Move Route Extras.  One of the options is to allow NPCs to wander around randomly within designated regions.
ok i edited yanflys scripted and hacked in that i can define multiple region id's as blocking

with this i can build a workaround. (1 non blocking region if with stepping spund and one blocking region ad with stepping sound per different stepping soundfile)

Would share it with you but atm it's some ugly frankenscripting and i don't know how to make proper script addons (i will look into it if i have time)

Original thread: https://forums.rpgmakerweb.com/threads/block-off-a-area-for-auto-moving-npcs.48852/