Player Switch - Multiple Players script support

Status
Not open for further replies.

Yanen

Villager
Member
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:

Code:
#--------------------------------------------------------------------------  # * Detect Collision with Player (Including Followers)  #--------------------------------------------------------------------------  def collide_with_player_characters?(x, y)    $game_player.collide?(x, y)  end
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I have split this out into its own thread, since it involves a custom script and not the RTP scripts.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Just turn Through ON for the player-event

Code:
class Game_PlayerEvent < Game_Event    attr_accessor :player  def initialize(map_id, event)    super    @player = event.player    @through = true  endend
Might work.
 
Last edited by a moderator:

Yanen

Villager
Member
Joined
Jun 28, 2013
Messages
12
Reaction score
1
Primarily Uses
Just turn Through ON for the player-event

class Game_PlayerEvent < Game_Event attr_accessor :player def initialize(map_id, event) super @player = event.player @through = true endendMight work.
That did the job.  Thanks!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top