Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

With playerspecificpages, it's impossible to change maps as a GM unless you join the game as a player. Any workaround?

Hello everyone, I use the MapChange script and I have noticed that when I try to change maps as a GM, it keeps me on the same map and moves my 'player self' instead. If I join the game as a player, there is no problem; the script works fine and moves me correctly from one map to another. I deduce that the 'playerspecificpages' property returns my player ID but not my GM ID. Therefore, I wanted to know if there is a way to move the GM. Thank you in advance!
1717269585
timmaugh
Forum Champion
API Scripter
Hey Atlas... I had a read through the code for that script, and it looks like if you don't supply a "player" argument, it uses the ID of the sender. If you supply a "player" argument, it assumes that you have supplied a name. It looks for the first player with that name and returns the associated ID. That tells me you are either supplying a "player" argument but the name of your player-identity and the name of your GM-identity are the same (so it is finding the player version, first)... or you aren't supplying any command but you're calling the MapChange script from another script (like as part of a ScriptCards command). Script messages sent *from* a script command do not have a value in the playerid property that matches a player. Those messages instead say, "API". So depending on what you have going, you can fix this by either renaming your GM or player name... or you can run the GM-version of this command without a player argument... or (if you are calling the MapChange command from within another script's command line) you can install the Metascript Toolbox and configure SelectManager to give those properties back to the message. Basically, after you install the toolbox, you'd run this command one time: !smconfig +playerid +who Then try it again. If your problems owed to you running MapChange from another script's command line, this will fix it.
Thank you for your response! Reading my message again, I realize I wasn't clear. Here are a few more details to explain my problem. I am the GM in a game where I have two maps: Start and End. 1. I am on the Start map: 2. Then I write the command: !mc move --target End This command should take me to the End map. However, instead of moving me to the End map, I remain on the Start map, and a small blue icon moves to the End map: If I perform the same action after joining the game as a player, then, when I execute the command, I do go to the End map. So I wonder if there is a different ID or some element preventing the movement between maps in GM view...
There isn't a way to change the view of the GM. The GM view doesn't change when moving the player ribbon. I have a  ScriptCards  that will do that the other way. When the GM runs the ScriptCard it will provide a button to change the player's page to the page the GM is currently viewing, if different. As far as I know, there is still no way via the API to change the page viewed by the GM. The  _lastpage property of a Player object  is read-only per that document so I decided to make a ScriptCard to go the other way, I change the page I'm on and move the players there.
1717308054
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Joshua has got the right of it. The API cannot move the GM view. The GM basically has a lot of exceptions to the restrictions players are under.
Thank you both for your responses. It's much clearer for me now. Well, it will be for the players. Thanks again, and have a nice day.