RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] [VXA] NPC Roam Areas - Stop someone from entering a section

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 58
in training
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.
« Last Edit: September 25, 2012, 01:46:11 AM by Chickan117 »

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
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

***
Rep:
Level 77
RMRK Junior

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