Main Menu
  • Welcome to The RPG Maker Resource Kit.

Request: Controlled Random NPC Movement

Started by Tawa_Hoda, October 12, 2011, 03:50:51 AM

0 Members and 1 Guest are viewing this topic.

Tawa_Hoda

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...

Acolyte

You could always mark off an area using invisible events.

modern algebra

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.

Zeriab

You can also restrict events to certain terrain tags using this script: http://pastebin.com/VqrchC9S

*hugs*