RavenBlueIndigo 121 Posted April 1, 2016 Hello. I need a script that makes it so certain events are unable to move vertically and can only move horizontally(left/right). Share this post Link to post Share on other sites
Stapleton 18 Posted April 1, 2016 (edited) # Use the following in script call within move routes.# move_horizontal_saplon #for random movement # move_toward_character_saplon($game_player) #for moving toward player # move_away_from_character_saplon($game_player) #for moving away from player class Game_Event def move_horizontal_saplon move_straight(4 + rand(2) * 2, false) end def move_toward_character_saplon(character) sx = distance_x_from(character.x) if sx.abs move_straight(sx > 0 ? 4 : 6) move_straight(sx > 0 ? 4 : 6) if !@move_succeed && sx != 0 end end def move_away_from_character_saplon(character) sx = distance_x_from(character.x) if sx.abs move_straight(sx > 0 ? 6 : 4) move_straight(sx > 0 ? 6 : 4) if !@move_succeed && sx != 0 end end end Here I threw this together real quick. Edited April 1, 2016 by Stapleton Share this post Link to post Share on other sites