Nice work, its always good to see people creating new scripts..
I see many things off with this (not trying sound harsh, but a list of things you should do to improve your script)
0) Not really a problem but I hate seeing non-indented code (one of my pet peeves, other programmers may be using your code and its a proper convention to indent your code) Also you should disable smileys since I see a few of them in the code
1) The problem Draken mentioned
2) Why a Game_Player2 class? you could have easily just edit the original Game_Player to get the same effect (add a variale to check if its Player 1 or Player 2)
3) There is a bug in this code block with the Game_Player2 class (bolded line)
[B]if Input.trigger?(Input::C)[/B]
# Same position and front event determinant
check_event_trigger_here([0])
check_event_trigger_there([0,1,2])
end
Expand to see the code.
The bug is that both player1 and player2 can push the same button to activate events
4)In your class Spriteset_Map a couple of your variables are spaced out for example this line
@character_sprites.push(Sprite_Character.new([B]@view port1[/B], $game_player))
Expand to see the code.
5) Condense your code try aliasing a few of the methods you edited (if possible) If you didn't make any changes to a method leave it out doing so will increase compatibility with other scripts
6)
def command_new_game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Stop BGM
Audio.bgm_stop
# Reset frame count for measuring play time
Graphics.frame_count = 0
# Make each type of game object
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
[B]$game_player2 = Game_Player2.new[/B]
# Set up initial party
$game_party.setup_starting_members
# Set up initial map position
$game_map.setup($data_system.start_map_id)
# Move player to initial position
[B]$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player2.moveto($data_system.start_x, $data_system.start_y)[/B]
# Refresh player
$game_player.refresh
$game_player2.refresh
# Run automatic change for BGM and BGS set with map
$game_map.autoplay
# Update map (run parallel process event)
$game_map.update
# Switch to map screen
$scene = Scene_Map.new
end
Expand to see the code.
a) first bolded lines refer to 2)
b) You are starting both the players on the same tile that should be changed
7) This is more cosmetic you see this line in method battle_test
$game_player = Game_Player.new
Expand to see the code.
8)
def transfer_player
# Clear player place move call flag
$game_temp.player_transferring = false
# If move destination is different than current map
if $game_map.map_id != $game_temp.player_new_map_id
# Set up a new map
$game_map.setup($game_temp.player_new_map_id)
end
# Set up player position
[B]$game_player.moveto($game_temp.player_new_x, $game_temp.player_new_y)
$game_player2.moveto($game_temp.player_new_x, $game_temp.player_new_y)[/B]
# Set player direction
case $game_temp.player_new_direction
when 2 # down
$game_player.turn_down
$game_player2.turn_down
when 4 # left
$game_player.turn_left
$game_player2.turn_left
when 6 # right
$game_player.turn_right
$game_player2.turn_right
when 8 # up
$game_player.turn_up
$game_player2.turn_up
end
# Straighten player position
$game_player.straighten
$game_player2.straighten
# Update map (run parallel process event)
$game_map.update
# Remake sprite set
@spriteset.dispose
@spriteset = Spriteset_Map.new
# If processing transition
if $game_temp.transition_processing
# Clear transition processing flag
$game_temp.transition_processing = false
# Execute transition
Graphics.transition(20)
end
# Run automatic change for BGM and BGS set on the map
$game_map.autoplay
# Frame reset
Graphics.frame_reset
# Update input information
Input.update
end
end
Expand to see the code.
see 6b) sharing the variables used in this method among the two players isn't a good idea
9) in a few of the methods in Scene_Map you missed a couple of lines
$game_playerr.straighten this method straightens the player (sets the frame of the animation to the first frame of the direction)
10) The interpreter class must also be edited so you can use event commands on Player 2
A nice first try, I await further improvements to your script, since allowing for two player games would be cool