Here's my setup:
I am testing with MapTool 1.4.1.8
I have two instances running: the first is a GM instance that starts a server and the second is a Player instance that connects to the server.
I have created the following macro named "NextPC" which finds all PC tokens on the map and selects the next one.
Code: Select all
[h: pcIds = getPC()]
[h: currentlySelectedPCId = getTokens(",", json.set("{}", "pc", 1, "selected", 1))]
[h: currIx = listFind(pcIds, currentlySelectedPCId)]
[h: pcCount = listCount(pcIds)]
[h: ixToSet = -1]
[h, if(currIx == pcCount - 1): ixToSet = 0; ixToSet = currIx + 1]
[h: selectTokens(listGet(pcIds, ixToSet))]
I followed the wiki instructions and created a Library Token whose name is "Lib:XboxController" and, using the Selection pane, added the macro there instead. As per the wiki, I have made sure of the following:
* the library token is Visible To Players
* it has the correct naming convention (Lib:XboxController)
* there is only once instance of it in the campaign file
* the token is not owned by anyone
* the macro on the library token has "Allow Players to Edit Macros" unchecked
At this point, I start a server in the GM instance of MapTool and connect to it as a player using the other instance. In the player instance if I select the library token and click the macro button for "NextPC" that is in the Selection pane, I get the following message in chat:
This seems to directly contradict what the wiki says (that the token is not owned by anyone). If I change the ownership of this library token to All Players the player instance is then able to run the macro by clicking the button in the Selection pane. Fine, I can change this and it works.Only Lib:XboxController's owners can impersonate or run macros on it.
The final step that I need to get working for all this work to be worthwhile to me is for the macro to run when the player instance presses a hotkey.
In this macro I have chosen the Hot Key "F2" from the dropdown. Here are my expectations for how this should all work at this point:
1. GM starts Maptool and loads the campaign file that has exactly 1 copy of the library token "Lib:XboxController" in it
2. The map contains one or more PC tokens
3. GM starts a server
4. Another instance of Maptool connects to the server as a Player instance and enters fullscreen mode (ctrl+alt+enter)
5. The player instance can now press "F2" to cycle through selecting the PC tokens
The issue I am having is that step 5 does not work. After step 4, pressing "F2" on the player instance does exactly nothing. HOWEVER, if in the player instance I find and select the library token, open the Selection pane, and click on the macro button for "NextPC", it will correctly select the first PC token. At this point the "F2" hotkey begins to function as expected but not in fullscreen mode.
I have spent more than a few hours already trying to get this hotkeyed macro to work in fullscreen from the player instance but I've reached the end of the line and need some assistance. If anyone could help me figure out how to do this I would be very grateful. Basically, I want to be able to connect to the GM's server, enter fullscreen, and then be able to hit "F2" and to have my macro execute.