The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => Topic started by: Chickan117 on September 25, 2012, 12:59:04 AM

Title: [RESOLVED] [VXA] NPC Roam Areas - Stop someone from entering a section
Post by: Chickan117 on September 25, 2012, 12:59:04 AM
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:

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F1FEB3.png&hash=f0c61b00bab19ed8b819e0bc800adb761212e62f)

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.
Title: Re: [VXA] NPC Roam Areas - Stop someone from entering a section
Post by: D&P3 on September 25, 2012, 01:07:23 AM
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.
Title: Re: [VXA] NPC Roam Areas - Stop someone from entering a section
Post by: Wiimeiser on September 25, 2012, 01:07:46 AM
This (http://yanflychannel.wordpress.com/rmvxa/field-scripts/move-restrict-region/) should work
Title: Re: [RESOLVED] [VXA] NPC Roam Areas - Stop someone from entering a section
Post by: Chickan117 on September 25, 2012, 01:46:54 AM
Thanks guys. The event works well for this example and that script will have useful applications elsewhere in the game. Kickass answers :)