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

Select attack with one button

1475227610

Edited 1475227958
hey guys, here is my next problem my token has two attacks (abilities) biteattack &{template:default} {{name=bite attack}} {{attack=[[1d20@{attack bite}]]}} tailattack &{template:default} {{name=tail attack}} {{attack=[[1d20@{attack tail}]]}} now i'm searching for a possibility to press one attack button and select and execute the needed attack i tried a new ability makro %{?{type|bite|tail}attack}} but i doesnt work (pretty sure because of order of operation problems but couldnt find a solution) next i tried a chat makro &{template:default} {{name=Crocodile}} {{Typ=[Bite](!  & #13;%{selected|biteattack}) [Tail](!  & #13;%{selected|tailattack})}} this worked, but the result is not shown in a template and instead as Rolling 1d20+5 = (14)+5'>19 somebody has an idea to solve this (prefered with a querie solution)
1475228320

Edited 1475228633
?{Attack?| Bite, &{template:default& #125; {{name=bite attack& #125;& #125; {{Angriff=[[1d20@{attack bite}]]& #125;& #125;| Tail, &{template:default& #125; {{name=tail attack& #125;& #125; {{Angriff=[[1d20@{attack tail}]]& #125;& #125; } Maybe this'll work? Remove the spaces between & and #, of course.
1475228870

Edited 1475229057
Ziechael
Forum Champion
Sheet Author
API Scripter
You can nest the entire template in a query: ?{Attack?| Bite,&{template:default} {{name=bite attack}} {{attack=[[1d20+@{attack bite}]]}}| Tail,&{template:default} {{name=tail attack}} {{attack=[[1d20+@{attack tail}]]}} } See the  roll queries advanced usage section of the wiki for more information on how to use the html replacements to avoid conflict with syntax.
perfect it works. thanks a lot
1475237229
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Welcome to the scary world of roll query nesting. An alternative to that if your macro starts getting too complicated is ability command buttons. There is also a Google sheet that I made to simplify the replacing of problem characters with html code. <a href="https://wiki.roll20.net/Macros#Ability_Command_But" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_But</a>... <a href="https://app.roll20.net/forum/post/3905546/easily-nest-roll-queries/?pageforid=3905546#post-3905546" rel="nofollow">https://app.roll20.net/forum/post/3905546/easily-nest-roll-queries/?pageforid=3905546#post-3905546</a>
Scott C. said: Welcome to the scary world of roll query nesting. An alternative to that if your macro starts getting too complicated is ability command buttons. There is also a Google sheet that I made to simplify the replacing of problem characters with html code. <a href="https://wiki.roll20.net/Macros#Ability_Command_But" rel="nofollow">https://wiki.roll20.net/Macros#Ability_Command_But</a>... <a href="https://app.roll20.net/forum/post/3905546/easily-nest-roll-queries/?pageforid=3905546#post-3905546" rel="nofollow">https://app.roll20.net/forum/post/3905546/easily-nest-roll-queries/?pageforid=3905546#post-3905546</a> great this will be helpfull. was lucky this time without the need of replacing characters but i read about it today and it is pretty scary :D