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

Macro to move TurnMarker1 marker to GM layer?

1640140532

Edited 1640171317
Hi all! It's my first time on the forums, and I'm new to using API scripts in my games, so the answer to this may be blindingly obvious, and I apologise if it's in the wrong place! I'm trying to write a simple macro to make a character token invisible using rollable tokens.  I'm also hiding the name and bars from players - anything that would give the position away. I also use The Aaron's very useful TurnMarker1 script in my games - which of course is specifically meant to give position away. To get around this I'm looking for away to send the marker token to the GM layer when it moves to the invisible character using !tokenmod —set gmlayer, but can't figure out a reliable way to do this from the macro.  The first problem is simply selecting the maker as Token_id changes from map to map. I haven't yet started looking at the second problem which is going to be getting it to move whenever the invisible character's turn comes around, but confidently expect to stumble at that too! Can anyone help me out? Is what I'm trying to do even possible? Thanks, Law
1640195661
The Aaron
Roll20 Production Team
API Scripter
Hmm.  I might suggest using Bump to make them invisible instead of a face change.  There isn't a way for the API to know if an image is transparent, but Bump + TurnMarker1 should give you what you want.
The Aaron said: Hmm.  I might suggest using Bump to make them invisible instead of a face change.  There isn't a way for the API to know if an image is transparent, but Bump + TurnMarker1 should give you what you want. Thank you! :)  I  did consider Bump, but I didn’t think players would be able to control/see their character on the gm layer?  In retrospect telling if a token is on side x every time their initiative comes round is a more complicated task than I had thought it would be at 3am…
It's a little complicated, but I built an NPC Layers macro in Scriptcards that displays all the NPCs on a page and allows me to move them between between layers with a simple click (See below).  It shows this dialog in the chat window.  The capitalized letter indicates the layer the token is currently on (Object, Game, Map, Lighting).  Clicking on the letter moves the token to that layer.  I normally use a renumbering tool to better differentiate my tokens.  Clicking on the Token name actually pings the token on the map for the me, the GM.   Required API Scripts include:  Scriptcards, TokenMod and PingToken (special version).   If you are interested, I can post the code for the script/macro and my version of the the code for PingToken.
Will M. said: It's a little complicated, but I built an NPC Layers macro in Scriptcards that displays all the NPCs on a page and allows me to move them between between layers with a simple click (See below).  It shows this dialog in the chat window.  The capitalized letter indicates the layer the token is currently on (Object, Game, Map, Lighting).  Clicking on the letter moves the token to that layer.  I normally use a renumbering tool to better differentiate my tokens.  Clicking on the Token name actually pings the token on the map for the me, the GM.   Required API Scripts include:  Scriptcards, TokenMod and PingToken (special version).   If you are interested, I can post the code for the script/macro and my version of the the code for PingToken. This would be great.  I am currently using 'Bump' but it has a huge effect on the lag and visibility has become an issue in conjunction with 'token aura'  This script looks like it would be a whole lot easier to manage.  I would appreciate it if you could post the code to both of the scripts.
1640254855

Edited 1640255375
@Will M that sounds pretty useful, so yes please, the scripts would be great!  This conversation has made realise I’m overthinking - for NPCs gmlayer invisibility works fine and for PCs the turnmarker isnt really a problem as its only active on their turn, and while i wouldnt put it past my players to be obscenely good at pelmanism, they’ll still only have only a rough idea where their invisible comrades are most of the time.
1640268914
The Aaron
Roll20 Production Team
API Scripter
If you decide you want players to be invisible, Bump does work for players. =D
@ The Aaron Good to know thank you! :D