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

It's a Trap! and TokenMod

Nick O.
Forum Champion
I'm trying to have It's a Trap turn off the vision of a token when said token hits a trap, but I can't get it working. I have TokenMod installed, and have clicked the TokenMod Script button that appears in the It's a Trap wizard. I've tried entering --set bright_vision|off and  !token-mod --set bright_vision|off, but these don't seem to be working. I receive a chat message saying that the trap has been triggered, but the token's vision remains, and there are no errors posted to the API Console. Can someone let me know where I'm going wrong?
API Scripter
Are you feeding the token id to the TM line? With It's a Trap firing the line to TM, that's an API calling an API and you lose the selected tokens. If that's actually the problem you're running into, you could either install SelectManager to make sure TM can see the selected tokens, or you can use the --ignore-sel and --ids arguments of TM, and feed it an ID. I forget how IaT stores the command line that it fires, but if it is immediately passed through the chat you could use @{selected|token_id} as that will still resolve. If it isn't passed through the chat immediately (if IaT goes and gets the command and then sends it through), then that might not resolve, but there could be other ways to catch the ID of the triggering token with metascripts.
Nick, first off huge fan, secondly, I found that It's a Trap can sometimes require the player ribbon to be on the page you are fiddling with.  
Nick O.
Forum Champion
Thanks, everyone! It turns out you need to pass in the VICTIM_ID keyword e.g.,  - -ids VICTIM_ID --set bright_vision|off