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 .
Advertisement Create a free account Compendium in Game, Join Today

SpawnDefaultToken and TokenCondition help please

1614024608

Edited 1614024634
Hi, Having purchased some animated spell affects on the marketplace ( <a href="https://marketplace.roll20.net/browse/set/9398/animated-spellbook-concentration" rel="nofollow">https://marketplace.roll20.net/browse/set/9398/animated-spellbook-concentration</a> ) i set about making the Spirit Guardians animation a "Decoration" character to stick to and follow my PC around using the TokenCondition API (Decoration: SG [width:7g|height:7g] - works great).&nbsp; I have now *unsuccessfully* tried to take this to the next level using the SpawnDefaultToken API in a macro that will cast the spell and then auto spawn the "Decoration" token on top of my PC. I * have * already saved the original animated effect for spirit guardians locally to my desktop and uploaded to my art library by a different name to use as the new default token in my "Decoration" character to be able to be called by SpawnDefaultToken. However... SpawnDefaultToken doesn't seem to like the "pipe" in between the width and height descriptors in the Decoration name as I'm being returned this error message in the chat where it seems to cut off the remainder of the name: character "Decoration: SG [width:7g" not found Any solutions/suggestions/alterations/improvements/workarounds????? All help greatly appreciated, Thankyou!
1614036610
David M.
Pro
API Scripter
Can you share the code you are using? I honestly had no idea what would happen if the default token was an animated gif or webm. I just tried it in my test game with...mixed results. It seemed to work once, but trying it again it seemed to freeze (but sandbox didn't crash). Not sure if it will eventually finish the repeated attempt or not. So it seems YMMV in that regard. Regarding your specific question, though, pipes will be problematic as they are a delimiter for parsing the commands. Can you just rename the "character" to something that doesn't contain a pipe?