Terrain Tag Speed Modifier
Authors: ForeverZero
Version: 1.00
Type: Movement Add-on
Key Term: Movement Add-on
IntroductionVery simple script that will automatically change the player's move speed based on the Terrain Tag of the Tile ID they are walking on. Good if you want your player to walk slower through high grass, moving up and down ladders, etc. without having to do it manually through eventing.
Features
- Easily customized to your needs
- Merely set the terrain tags in your database to change player speeds
ScreenshotsNone really required...
DemoNone
Script
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Terrain Speed Modifier
# Author: ForeverZero
# Version: 1.00
# Date: 2.28.2010
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Player speed will be changed according to the current terrain tag of
# the tile they are standing on. Can be modified as desired.
#
# Just change terrain tags in Database as needed.
#
# Use Call Script ($game_system.terrain_tag_speeds = true/false)
#
# See below to change default settings.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Game_System
attr_accessor :terrain_tag_speeds
alias terrain_tag_speeds_init initialize
def initialize
terrain_tag_speeds_init
@terrain_tag_speeds = true
end
end
class Game_Player
attr_accessor :move_speed
end
class Game_Map
# Edit as needed
alias terrain_move_speeds_upd update
def update
terrain_move_speeds_upd
if $game_system.terrain_tag_speeds
if $game_player.terrain_tag == 7 # If Terrain Tag = 7, Move Speed is 2
$game_player.move_speed = 2
elsif $game_player.terrain_tag == 6
$game_player.move_speed = 3 # If Terrain Tag = 6, Move Speed is 3
else
$game_player.move_speed = 4 # Default Player Move Speed
end
end
end
end
InstructionsPost above Main, and below Debug
CompatibilityShouldn't be any. Possible if you are using a script that modifies player movement
Credits and Thanks
- ForeverZero, for writing the script.
Author's NotesNone