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

Error with token-mod and delay script

I don't know if it's a syntax error but I can't get the token-mod to send the selected token to the gm layer when I use it in conjunction with delay, follow the commands used: !delay 1 --!cfx burst-acid @{target|destino|token_id} @{target|destino|character_id} !delay 2 --!sfx song:explo2 action:play unique:true volume:20 !delay 3 --!token-mod --ids @{selected|token_id} --set layer|gmlayer Does anyone know how to fix?
1605640897
The Aaron
Roll20 Production Team
API Scripter
Do you have Players can IDS turned on for TokenMod?  By default, TokenMod treats the API user as unprivileged, like a regular user. 
I am testing only with my GM profile I have not tested with players yet, I was unaware of this token-mod pattern.
1605644268
The Aaron
Roll20 Production Team
API Scripter
Run: !token-mod --config players-can-ids once, that will probably fix it.
It worked! Thank you! My games will be better thanks to you!
1605645241
The Aaron
Roll20 Production Team
API Scripter
HAHAHA, no problem. =D
Hey Aaron, could you help me again? My son's little space mouse needs to use his stealth and for that I would like to apply a fx effect, a sound and leave the token opaque, I am using the token-mod to exchange the current token for an opaque one (the opaque token is in my library), the code works except for the opaque token that doesn't appear. If I remove the! Delay from the mod token line then the opaque token appears but in a different order (it becomes opaque before the fx effect and the sound). Ah I used !token-mod --config players-can-ids !delay 1 --!sfx song:furtividade action:play unique:true volume:20 !delay 2 --!cfx burn-death @{selected|token_id} @{selected|token_id} !delay 2 --!token-mod --ids --set imgsrc|<a href="https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681</a>
1606003773

Edited 1606003812
The Aaron
Roll20 Production Team
API Scripter
You need to pass the token id after --ids: !delay 1 --!sfx song:furtividade action:play unique:true volume:20 !delay 2 --!cfx burn-death @{selected|token_id} @{selected|token_id} !delay 2 --!token-mod --ids @{selected|token_id} --set imgsrc|<a href="https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/179847516/DGmGZaHIg7_z2mWkjKJ9_g/max.png?1605988681</a>
Hi, I'm gonna catch a ride on this post and..&nbsp; I'm trying to do the same, but a) can't find the !delay api anywhere, b) it doesnt work. I've been around google for hours now, but couldn't make work. working -&nbsp; /fx explotion_2 @{selected|token_id} !token-mod --ids -MQGkGig-1OlLmsLah6U --ignore-selected --set layer|objects Not working -&nbsp; /fx explotion_2 @{selected|token_id} !delay 2 --!token-mod --ids -MQGkGig-1OlLmsLah6U --ignore-selected --set layer|objects Any ideas? help? please?..&nbsp;
So, Obviously, 2 seconds after I've post my question, I've found the answer. Steps (Hoping it might help others newbs..) 1 - The !delay API is not in the library. its in here -Link- &nbsp;, by this guy named&nbsp; MyRoll20Stuffs and you need to create a "new API", and copy-paste it. 2 - AFTER &nbsp;you "create" the API, you need to change the token permissions to "On", by using&nbsp;!token-mod --config players-can-ids afterwards, it worked like a charm. Now when I click my Mind Flayer, (as if having one is not enough), My players get a flash of a full-map-size-picture of it's face, to the face!! P.s. Thanks to The Aaron .
1609859269
The Aaron
Roll20 Production Team
API Scripter
Ah, great! =D&nbsp; Let us know if you run into any other issues.