Hello, So i found a simple jumping Script
here and i made an edit to it, but that's not really the point.
What I need is a restriction in the script that prevents the player from jumping over more than on impassable tile, a restriction so that the player cannot jump over the sides of cliffs that are not on the same level as the character, the level being defined by a region specified by a script call.
Thank you for your time.
# Allows jumping by input...
# ** module INPUT
module JUMP
module Settings
DashJumpSize = 3
JumpSize = 2
Key = :Z # the game key that can be pressed to jump. Not necessarily the
# same as the keyboard key
end # End - Settings
end # End - JUMP
# ** Game_Player
class Game_Player < Game_Character
# alias method move_by_input
alias jump_settings_move_by_input_alias_method_49271 move_by_input
def move_by_input
jump_settings_move_by_input_alias_method_49271
try_jump if Input.trigger?(JUMP::Settings::Key)
end # End - move_by_input
def try_jump
#print "inside try_jump \n"
jump_x, jump_y = 0,0
case @direction
when 2
jump_y = get_jump_size
$game_temp.reserve_common_event(event_id=1)
when 4
jump_x = -get_jump_size
$game_temp.reserve_common_event(event_id=1)
when 6
jump_x = get_jump_size
$game_temp.reserve_common_event(event_id=1)
when 8
jump_y = -get_jump_size
$game_temp.reserve_common_event(event_id=1)
end
jump(jump_x, jump_y) if map_passable?(jump_x+@x, jump_y+@y, @direction)
end # End - try_jump
def get_jump_size
val = dash? ? JUMP::Settings::DashJumpSize : JUMP::Settings::JumpSize
#print "jump size = #{val}\n"
#val
end
end # End - Game_Player
Edit: My apologies I forgot to state what maker this is for. It is For RMVX Ace.