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

[Script] Is it possible? Character clicks object, rolls perception, gets result

Hello, Before I dive too deeply into the API (I haven't used it before) I was wondering if this was even possible. I would like to set it up where if a player clicks an object (token), then selects a macro or a button or something ("Investigate") it will check that players character sheet, roll their perception, and if it is high enough whisper them a result (and all results that are lower).  I believe I can use the attributes on a token to set the "breakpoints" for when the character receives information, but I am not sure if the rest is possible.  Thank you for your time! 
1584721533
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I know I have seen a very similar script for doing knowledge checks, but my google-fu is failing me.
<a href="https://app.roll20.net/forum/post/7506126/script-check-it-out/?pageforid=7506126#post-7506126" rel="nofollow">https://app.roll20.net/forum/post/7506126/script-check-it-out/?pageforid=7506126#post-7506126</a> &nbsp;Is that what you were referring too? The pointer towards a knowledge check helped a lot ----- I was googling a lot for "when i click an object" and such and was coming up empty&nbsp;
1584737874
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
That's the bunny!