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

A !torch issue?

I'm trying to activate flicker on a token that emits light, and type the following: !flicker-on [40 [20 [true [@{target|Target 1|token_id}|360]]]] This returns the following message: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "l" found. The other !torch commands appears to be working fine. What am I doing wrong with the flicker? Please advice. /Jens
1529554632
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The square brackets in Aaron's example command denote optional arguments, you don't include them in the actual command.
1529561271

Edited 1529561292
Jens
Pro
Ah, so easy. I would never have thought of that myself though. Thank You very much for Your quick reply.
1529601572
The Aaron
Pro
API Scripter
I guess I need to rewrite the instructions for that script. The square brackets [ ] are used to denote an optional parameter. Nesting them denotes that the outer optional parameter is necessary before using the next optional parameter. Probably the particularly confusing thing is that it uses positional arguments. The arguments are: !torch RADIUS DIM_RADIUS VISIBILE TOKEN_IDS With the option of a --ANGLE mixed in with the TOKEN_IDS. Any of the first 3 arguments can be replaced with - to mean use the default. The defaults are 40 for the RADIUS, half the RADIUS for the DIM_RADIUS, and on for VISIBLE. Examples: !torch 40' radius light, dim starting at 20', visible to all players, 360º vision, on the selected token. !torch 60 15 no --120 60' radius light, dim starting at 15', not visible to other players, 120º vision, on the selected token. !torch 120 - - @{target|token_id} 120' radius light, dim at 60', visible to all players, on the token targeted with the @{target} selector. I hope that helps.
Yes, that is very helpful indeed. Thank You so very much.