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

ChatSetAttr with other APIs

Hi, I'm sure I am doing something dumb ... but I don't seem able to mix ChatSetAttr with other APIs in a macro. For example: This works fine (for an Attribute called END):      !setattr --sel --END|[[@{selected|END}-3]] ... but this errors out with " No target characters. You need to supply one of --all, --allgm, --sel, --allplayers, --charid, or --name ."     !setattr --sel --END|[[@{selected|END}-3]]     /fx beam-magic @{selected|token_id} @{target|Target 1|token_id} What is it about the addition of a different API in the second macro which breaks ChatSetAttr? The /fx works just fine. Thanks in advance ...
This isn't an api issue but more of how Roll20 parses things. You can check out&nbsp; <a href="https://app.roll20.net/forum/post/3737514/script-chatsetattr-set-character-attributes-via-chat-messages/?pagenum=4" rel="nofollow">https://app.roll20.net/forum/post/3737514/script-chatsetattr-set-character-attributes-via-chat-messages/?pagenum=4</a> &nbsp;there's some info on it. But the @{target} clears out the value thus causing the error. the work around is you need to change the --sel from your command line for chatsetattr to --name @{selected|character_name} it should then work, it did when i tested it. !setattr --name @{selected|character_name} --END|[[[[@{selected|END}-3]]]] /fx beam-magic @{selected|token_id} @{target|Target 1|token_id}
Thank you Mark, that worked great!!