Main Menu

[RESOLVED] [VXA] NPC Roam Areas - Stop someone from entering a section

Started by Chickan117, September 25, 2012, 12:59:04 AM

0 Members and 1 Guest are viewing this topic.

Chickan117

I'm sure I've seen this covered elsewhere on the interwebs but I've just been unable to find the answer (must be getting my search terms wrong)... so I'll ask here :)

Is there any way from preventing an NPC from entering a particular area? For example:



In the above area you are the brown haired girl and the blonde girl is an NPC. Her autonomous movement is set to random however, if she enters that hallway you pretty much have no way of getting to the room at the bottom of the screen.

Is there any way I can set her to move randomnly throughout the main room alone? I guess I'd like to be able to designate an area and restrict her to that.

D&P3

Put an empty event in the space before entering the hallway and set the trigger to player touch.
NPCs can't walk on other events by default, so you'll have control over where it walks. You also set it to player touch, because if you are standing on that event and it is triggered by the action button, you won't interact with what you intended to.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3


Chickan117

Thanks guys. The event works well for this example and that script will have useful applications elsewhere in the game. Kickass answers :)