1.) Player is currently impersonating their own token.
2.) Player selects and clicks on an immmobile token with the macro I'm making on it.
3.) The macro sends the impersonated token to the selected map.
But what is happening is:
1.) Player is currently impersonating their own token.
2.) Player selects and clicks on immobile token with the macro I'm making on it.
3.) The macro sends the selected token (not the impersonated player token) to the map instead.
Here is the code I'm using, I honestly have no clue what is going on here or what I'm doing wrong. Apparently though, the macro recognizes the selected token as an impersonated token as well (I ran tests to see what the impersonated token and the selected token names were, the same ID pops up twice).
Code: Select all
<!-- Get current map name-->
[h: ThisMap = getCurrentMapName()]
<!--Get list of all maps-->
[h: MapList = getAllMapNames()]
<!--Get rid of the current map name from the list of maps-->
[h: ThisMapIndex = listFind(MapList, ThisMap)]
[h: MapList = listDelete(MapList, ThisMapIndex)]
<!--Sort the list of maps-->
[h: MapList = listSort(MapList, 'A')]
<!-- Prompt User for target map -->
[h:status = input(
"TargetMap|"+MapList+"|Which Map is this character going to?|LIST|SELECT = 0 VALUE = STRING")]
[h:abort(status)]
<!--Get destination on target map-->
[h: Xcoord = 1]
[h: Ycoord = 1]
[h: Zcoord = 1]
<!--Get the impersonated token-->
[h: ImpToken = getImpersonatedName()]
<!--Move Token to destination-->
[h: moveTokenToMap(ImpToken, TargetMap, Xcoord, Ycoord, Zcoord)]