platform script problem
#1
here is the platform script.
the script work i made a platform game with it..
the problem is that when i press up the player jump...
if there is an event (a bloc or something) the player hit it and then go down.
but if the player press up and left or right the player is going up pass the block..
it pass trough the block.. look at the script and please tell me how can i make the up left or up right like the up fonction (i mean not going trough the object)
Reply }
#2
I don't see the script..
Is it just me?
[Image: style7,Kristovski.png]
Reply }
#3
sorry here is the script i forgot to copy it here...

Code:
# ?¥?£?¥ XRXS50. Action-Maps XC. ?¥?£?¥ built 033010
# by ?÷‰Ã« ?Ý“y
#==============================================================================
# ? ƒJƒXƒ^ƒ}ƒCƒYƒ|ƒCƒ“ƒg
#==============================================================================
class XRXS50
#
# Action-Maps ‚ð‰Ã’“®‚³‚¹‚éƒ}ƒbƒvID‚ÃŒ”z—ñ
#
ENABLE_FULL_ACTY_MAPS = [1, 4, 2]
#
# ?uŽÃŽ‚ß?~‰Âº?v
#
ENABLE_SLIDE_DESCENT = true
#
# ŒÃ¼‚«ƒWƒƒƒ“ƒv(true : ŒÃ¼‚¢‚Ä‚¢‚é•Ã»ŒÃ¼‚ÖƒWƒƒƒ“ƒv?B
# false : ƒL?[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é•Ã»ŒÃ¼‚ÖƒWƒƒƒ“ƒv?B)
#
JUMP_AS_KEY = true
end
#==============================================================================
# ?¡ Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ?› ŒÃ¶ŠJƒCƒ“ƒXƒ^ƒ“ƒX•Ã?”
#--------------------------------------------------------------------------
# ŠÃ¹‘¶
attr_writer :direction_fix
attr_accessor :walk_anime
# ?V‹K
attr_accessor :now_jumps
attr_writer :xrxs50_direction_sidefix
#--------------------------------------------------------------------------
# ?› ?Ã…‘Ã¥ƒWƒƒƒ“ƒv‰Ã±?”
#--------------------------------------------------------------------------
def max_jumps
return 5
end
#--------------------------------------------------------------------------
# ?œ ?¶‚ðŒÃ¼‚*
#--------------------------------------------------------------------------
alias xrxs50_turn_left turn_left
def turn_left
if @xrxs50_direction_sidefix
@direction = 4
else
xrxs50_turn_left
end
end
#--------------------------------------------------------------------------

#--------------------------------------------------------------------------
alias xrxs50_turn_up turn_up
def turn_up
if @xrxs50_direction_sidefix
@direction = 8
else
xrxs50_turn_up
end
end
#--------------------------------------------------------------------------



#--------------------------------------------------------------------------
alias xrxs50_turn_down turn_down
def turn_down
if @xrxs50_direction_sidefix
@direction = 2
else
xrxs50_turn_down
end
end
#--------------------------------------------------------------------------

# ?œ ‰E‚ðŒÃ¼‚*
#--------------------------------------------------------------------------
alias xrxs50_turn_right turn_right
def turn_right
if @xrxs50_direction_sidefix
@direction = 6
else
xrxs50_turn_right
end
end
end
#==============================================================================
# ?¡ Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# ?œ ƒ?ƒCƒ“?ˆ—?
#--------------------------------------------------------------------------
alias xrxs50_main main
def main
# ƒ`ƒFƒbƒN
xrxs50_enable_check
# ŒÃ„‚Ñ–ß‚·
xrxs50_main
end
#--------------------------------------------------------------------------
# ?œ ƒtƒŒ?[ƒ€?X?V
#--------------------------------------------------------------------------
alias xrxs50_update update
def update
# ŒÃ„‚Ñ–ß‚·
xrxs50_update
# ƒtƒŒ?[ƒ€?X?V (?À•WŒn?X?V)
if @xrxs50_enable
update_coordinates
end
end
#--------------------------------------------------------------------------
# ?› ƒtƒŒ?[ƒ€?X?V (?À•WŒn?X?V)
#--------------------------------------------------------------------------
def update_coordinates
if $game_player.passable?($game_player.x,$game_player.y,2)
unless $game_player.moving?
if XRXS50::ENABLE_SLIDE_DESCENT and
Input.press?(Input::RIGHT) and
$game_player.passable?($game_player.x,$game_player.y+1,6)
$game_player.move_lower_right
elsif XRXS50::ENABLE_SLIDE_DESCENT and
Input.press?(Input::LEFT) and
$game_player.passable?($game_player.x,$game_player.y+1,4)
$game_player.move_lower_left
else
$game_player.move_down
end
end
else

$game_player.walk_anime = true unless $game_player.walk_anime
$game_player.now_jumps = 0
if Input.trigger?(Input::UP) and
$game_player.now_jumps < $game_player.max_jumps
if XRXS50::JUMP_AS_KEY
direction = $game_player.direction == 4 ? -1 : 1
else
if Input.press?(Input::RIGHT)
direction = 6
elsif Input.press?(Input::LEFT)
direction = 4
else
direction = 8
end
end
$game_player.jump(direction, -3)
$game_player.now_jumps += 1
$game_player.walk_anime = false
end
end
end
#--------------------------------------------------------------------------
# ?œ ƒvƒŒƒCƒ„?[‚ÃŒ?ê?ŠˆÃš“®
#--------------------------------------------------------------------------
alias xrxs50_transfer_player transfer_player
def transfer_player
# ŒÃ„‚Ñ–ß‚·
xrxs50_transfer_player
# ƒ`ƒFƒbƒN
xrxs50_enable_check
end
#--------------------------------------------------------------------------
# ?› XRXS50 ‚ª‰Ã’“®‚·‚é‚©”»’è
#--------------------------------------------------------------------------
def xrxs50_enable_check
if XRXS50::ENABLE_FULL_ACTY_MAPS.include?($game_map.map_id)
$game_player.now_jumps = 0 if $game_player.now_jumps.nil?
@xrxs50_enable = true
$game_player.direction_fix = true
$game_player.xrxs50_direction_sidefix = true
else
@xrxs50_enable = false
$game_player.direction_fix = false
$game_player.xrxs50_direction_sidefix = false
end
end
end
Reply }
#4
Moving this to RGSS Support as this isn't really a request.
Reply }
#5
so now can someone help me modifying the script?
i want to be able to jump left or right side and then be able to go down when i hit a block instaed of going through read my first text please then help me
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Plugin or Script help with Item menu, SKill menu, and Equip menu JayRay 2 62 Yesterday, 03:09 AM
Last Post: JayRay
   The z-space problem of displaying sprites icogil 28 12,647 03-05-2023, 03:31 AM
Last Post: DerVVulfman
   Script compatibility help Lord Vectra 3 4,603 07-25-2021, 11:42 PM
Last Post: DerVVulfman
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 15,840 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   "Wait" in the script Whisper 13 16,160 04-28-2020, 04:06 PM
Last Post: Whisper
   Skill Cooldown script Fenriswolf 11 16,438 12-10-2019, 11:10 AM
Last Post: Fenriswolf
   Help iwth script (RGSS Player crash) Whisper 3 8,532 06-17-2017, 05:03 PM
Last Post: Whisper
   Help modifying a script Keeroh 7 10,213 06-11-2017, 04:43 PM
Last Post: DerVVulfman
Question  Mog Menu script: help me stop the crazy picture movement during transitions Zachariad 4 9,856 05-31-2017, 05:10 AM
Last Post: Zachariad
   Actor names in Quest Script jreagan406 5 8,639 03-07-2017, 08:06 AM
Last Post: JayRay



Users browsing this thread: 1 Guest(s)