- Joined
- Jun 28, 2013
- Messages
- 12
- Reaction score
- 1
- Primarily Uses
This question goes out to Tsukihime, but anyone can answer it: is there a way, when using the Player Switch- Multiple Players script ( http://www.rpgmakervxace.net/topic/4062-player-switch-multiple-players/ ) to make it so that players can pass through each other?
#-------------------------------------------------------------------------- # * Determine if Passable # d : Direction (2,4,6,8) #-------------------------------------------------------------------------- def passable?(x, y, d) x2 = $game_map.round_x_with_direction(x, d) y2 = $game_map.round_y_with_direction(y, d) return false unless $game_map.valid?(x2, y2) return true if @through || debug_through? return false unless map_passable?(x, y, d) return false unless map_passable?(x2, y2, reverse_dir(d)) #return true if collide_with_characters?(x2, y2) return false if collide_with_events?(x2, y2) ### return true if collide_with_player_characters?(x2, y2) return true endI tried inserting that code into Game_CharacterBase (the code inserted has ### a next to it), but it didn't work. This is how i've defined collide_with_player_characters, which was based on something found in Game_Event:
#-------------------------------------------------------------------------- # * Determine if Passable # d : Direction (2,4,6,8) #-------------------------------------------------------------------------- def passable?(x, y, d) x2 = $game_map.round_x_with_direction(x, d) y2 = $game_map.round_y_with_direction(y, d) return false unless $game_map.valid?(x2, y2) return true if @through || debug_through? return false unless map_passable?(x, y, d) return false unless map_passable?(x2, y2, reverse_dir(d)) #return true if collide_with_characters?(x2, y2) return false if collide_with_events?(x2, y2) ### return true if collide_with_player_characters?(x2, y2) return true endI tried inserting that code into Game_CharacterBase (the code inserted has ### a next to it), but it didn't work. This is how i've defined collide_with_player_characters, which was based on something found in Game_Event:
Code:
#-------------------------------------------------------------------------- # * Detect Collision with Player (Including Followers) #-------------------------------------------------------------------------- def collide_with_player_characters?(x, y) $game_player.collide?(x, y) end

