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

Having Problems with a macro

I have been trying to fix this macro and I do not know what I am doing wrong. /emas "Elf" Shoots an arrow. #PointBlank= ?{Feat:Point Blank Is target at a range of 30 feet or less?|No, [[0]] |Yes, [[1]] } &{template:default} {{name= Longbow}} {{Attack= [[(1d20 + 6) + ?{#PointBlank}]] }} {{ Damage= [[(1d8 + 2) + ?{#PointBlank}]] }} What I basically want is for pointblank to add 1 to both to my longbow attack and my Damage When the Condition is met. For now it just makes the original #pointblank = 0 or 1 depending on which one I picked, But the other pointblanks ask me for another value when I just want the original #pointblank to change their values to 1 directly. Also, is there a way to change the topic of the dropbox from: "Input Value" to Feat:Point Blank? I would appreciate some help.
1467674568

Edited 1467674956
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
It looks like you're trying to use roll queries as a variable using programming language variable definitions. Change it to something like this: &{template:default} {{name= Longbow}} {{Attack= [[(1d20 + 6) + ?{Feat: Point Blank Shot|no, [[0]]|yes,[[1]]}]] }} {{ Damage= [[(1d8 + 2) + ?{Feat: Point Blank Shot}]]}} The roll query itself is the variable in roll20, you can't assign it to something else. Anytime you want that value, just type in ?{Roll Query prompt} wherever you need it. It will not store values between uses. EDIT: I believe this also fixes your problem with the label for the drop down as it gives this: Ignore this, realized what you were talking about. No there is no way to change what it says at the top. It takes whatever prompt you put in and puts it above/next to the drop down depending on size. EDIT 2: Also, #PointBlank is how you would call a global macro called PointBlank.
Hey, This helped me out a'lot man thank you. Also: What do you mean by global macro called PointBlank I decided to try the point blank shot problem later (now it got fixed thanks to you) and decided to work on another problem. It kinda works but not how I want it to: /w gm @{selected|token_name}'s [Perception](~selected|Perception-Check) I want it to give me the Perception-Check in secret. But it keeps sending it publicly. 
1467677552
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
A # followed by a name will reference a macro that you have made under the macros heading in the settings tab. So, it looks like you're whispering an ability command button to yourself to then call the perception check, but you are still just calling the perception check ability from the sheet when you click the ability command button. Why not just do this: /w gm @{selected|Perception-Check}
1467678119

Edited 1467678549
Just copy pasted exactly what you wrote got this: No attribute was found for @{selected|Perception-Check} tried changing it around and still nothing.  What I kinda want is for the game to tell me in secret(whisper) the name of the person's and his or hers Perception-Check. I made one similar but with initiative.  Something like this, it would be ideal without the button but that's the only way I know how to make it work.
1467681983

Edited 1467682126
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Woops, my bad, selected needs to be capped; Selected.  Try %{selected|Perception-Check} maybe, the sheet might have it saved as an ability instead of an attribute.
Same thing happened.
1467682363
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sorry, did same thing happen with the capped selected (that was incorrect) or did it happen with the % instead of the @?
Would it be this? /w gm %{selected|Perception-Check}
Yep, that was it. Thanks to the both of you for helping me fix this macro issue.