Help - Search - Members - Calendar
Full Version: when telling an NPC to randomly move
RPG RPG Revolution Forums > Scripting > Script Development and Support
Adrien.
Is this located in the scripts any where? I would love to bash it in. When you create an NPC and state "move about the board randomly" is that located any where?
stripe103
I think random movement is an option in a move route. Why don't you just use that?
Adrien.
because I wanted to change the way they randomly move when thats selected.
Philip
In a new project go to Game_Character and look at lines 684-694. The default code is below.

CODE
  #--------------------------------------------------------------------------
  # * Move at Random
  #--------------------------------------------------------------------------
  def move_random
    case rand(4)
    when 0;  move_down(false)
    when 1;  move_left(false)
    when 2;  move_right(false)
    when 3;  move_up(false)
    end
  end
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.