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 .
×

Player Token Actions

I am trying to add some player tokens to add a little flair to the game, especially when using spells.  I have created a macro to display effects from a spell, I then added the code from the character sheet to roll the spell (and damage).  I can get it to work on my end but the players can't as they can select the monster token to attack.  Is the script wrong?   %{-OjHvWEDjH8r1Chtx265|repeating_attack("KTtC7Evd7", "attack")} /as @{selected|token_name} Casts Fire Bolt toward *@{target|token_name}*  /fx beam-fire @{selected|token_id} @{target|token_id} /fx burst-fire @{target|token_id}  
1769272806
timmaugh
Forum Champion
API Scripter
There's nothing wrong in what you're doing... you're just running into a limitation of what the players can do using the syntax you're trying. I have a script that's nearly ready that allows turning /fx commands into a script command, instead, which would give you a lot more flexibility with what you're trying to do... however, for now, you're going to be limited to having 2 targeting requests in the script usage. You see how the @{selected} reference in the /fx command is asking for a token_id? You can use a targeting construction to provide that. Same as the token_name request in the /as line: %{-OjHvWEDjH8r1Chtx265|repeating_attack("KTtC7Evd7", "attack")} /as @{target|Source|token_name} Casts Fire Bolt toward *@{target|Target|token_name}*  /fx beam-fire @{target|Source||token_id} @{target|Target|token_id} /fx burst-fire @{target|Target|token_id}