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.
Request: Controlled Random NPC Movement

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 67
Zector Guard Commander
A while back I seen a script for XP  that would only allow the event to walk in while set on random movement in a certain are, like move within the 5 tiles but don't walk out of them. I was wondering if VX had anything like that...

*
A-pow 2015
Rep:
Level 81
2014 Best RPG Maker User - GraphicsFor frequently finding and reporting spam and spam bots2013 Most Unsung MemberSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.How can I help you? :Da^2 + b^2 = c^2Secret Santa 2012 ParticipantSilver - GIAW 10Silver - GIAW 9Bronze - GIAW HalloweenGold - Game In A Week VII
You could always mark off an area using invisible events.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, you could always make it faux-random. As in:

Move Left
Move Down
Move Up
Move Left
Move Down
Move Down
Move Right
Move Up
Move Right
Move Up

That would look random, but ultimately you control it so that it never goes out of bounds and it ends up at the starting point and repeats. You'd probably need to make it longer so that it wouldn't be obvious to the player that it's not actually random.


Alternatively, my Advanced Areas script allows you to confine events within areas: http://rmrk.net/index.php/topic,25247.0.html.

In that one, you can specify which areas the event can move around in, and it will be prevented from ever venturing outside those boundaries.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
You can also restrict events to certain terrain tags using this script: http://pastebin.com/VqrchC9S

*hugs*