This script provides you the ability to switch players in-game.
Unlike adding/removing party members to give the illusion that you're working with different people, this script allows you to create completely separate players that have nothing to do with each other.
All inventories are separate from each other (until I implement shared inventory), they have their own parties, possibly even their own HUD's.
- Real-time player switching
- Other players are drawn on the map where you left them
- Idle players move around randomly
- Can set up players to say random things
- Check whether any player is at an event position, or whether a specific player is at an event position.
By default, you have one player: you.
You begin by creating a new player, giving an actor ID as the party leader for that player
You can also choose some custom start position (map Id, x, y) by specifying them when creating the player
$game_players.create_player(2, 1, 5, 6)
This means you want the player initialized with actor 2 to be placed at map 1 at position (x=5,y=6)
Once your player is created, the script will set up all of your party information and your actor information for your new player.
Now on the game map, when you press the A key (in-game "X"), it will open the player-switch menu where you can switch players
Your other players on the same map will randomly move around and you can even talk to them!
The script also supports managing multiple players when it comes to eventing.
You also have the option of using moghunter's character select scene for the player switching.
You'll need to download a modified char select script as well as placing the resources inside the Graphics/System folder.
The actor pictures should be placed in the Pictures folder, using the following filename format
<FACE_NAME>-<FACE_INDEX + 1>
It relies on the face pictures, which I think makes sense because if you don't have a face picture, what's the point in having a portrait?
Note that ruby is 0-indexed, so the first face is index 0, so I just increased it by 1.
Modified moghunter's character select: http://db.tt/D6gYYMVF
Resources for the character select scene: http://db.tt/k7zRv7Wl
This script provides the basic functionality for player-switching.
I am aiming for full switching functionality where all of the other players are treated as events and you can talk to them and stuff.
I would like to create puzzles where you have to control multiple players. For example, maybe you need to step on two buttons at the same time, but this clearly isn't possible with only one player. The solution would be to switch players and coordinate them together. However, that will have to wait until I work out the details.
Edited by Tsukihime, 12 August 2012 - 02:08 PM.