Hiya! The script works amazing so far. Though is there a way to like "sync" their locations? I'm planning on using the other player as a "partner" with their own party and such to help in double battles which works great, but the problem I'm facing is that their locations are different when switching.
I think I can briefly switch player characters and transfer that partner player to the same map as the first player every time there is a map transition but is there an less convoluted alternative way to do this? But I'm also using Essentials v17.2 so if it's not possible to update the script with a snippet then I can try the transfer method.
Also, if I progress the story with one player with switches/vars would I also have to set the story switches/vars for the second player too or is that gamewide?
Hi TinyDratini, you could probably achieve syncing their locations with this command (works on the v17.2 version):
pbSetLastMap(CHARACTER_ID, MAP_ID, X, Y, DIRECTION)
For example,
just before you switch to the other character using "pbSwitchCharacter", you can use the above method to set the other character's "last map" location - where they spawn when you switch to them. It'd look like this:
pbSetLastMap(($PokemonGlobal.playerID + 1) % 2, $game_map.map_id, $game_player.x, $game_player.y, $game_player.direction)
For the first parameter, I just assumed you're switching between character IDs 0 and 1, so if it's different then you'll have to adjust that.
Also, all global switches and variables, as well as self switches, are gamewide, so you don't need to worry about setting them for both players. Hope that helps!