#Script criado por kjr
#Membro da Comunidade JogosRPG -
www.jogosrpg.com.br#========================================================
module JUMP
JUMP_KEY = Input::Y #Tecla para pular (tecla S no teclado)
DASH_KEY = Input::X #Tecla para correr (tecla A no teclado)
VAR = 1 #Variável que indica quantos tiles o herói pula (deixe o valor da variável em 0 para desativar)
end
class Game_Character
attr_accessor:move_speed
end
class Scene_Map
alias old_update update
def update
old_update
if Input.press?(JUMP::DASH_KEY)
$game_player.move_speed = 5
else
$game_player.move_speed = 4
end
if Input.trigger?(JUMP::JUMP_KEY) and $game_variables[JUMP::VAR] != 0
dash = $game_player.move_speed == 5 ? 2 : 0
case $game_player.direction
when 2
vx = 0
vy = +$game_variables[JUMP::VAR] + dash
when 4
vx = -$game_variables[JUMP::VAR] - dash
vy = 0
when 6
vx = +$game_variables[JUMP::VAR] + dash
vy = 0
when 8
vx = 0
vy = -$game_variables[JUMP::VAR] - dash
end
$game_player.jump(vx,vy)
end
end
end