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

[API] It would be great to get an event when a Shift Ping happens.

Score + 48
1577226367
The Aaron
Roll20 Production Team
API Scripter
We could use this for a bunch of things!  "where did you want to target that Fireball?"  "Where do you want the NPCs to gather?" "What are you looking at?"  "Which door?".  I could probably think of a hundred ways to use this. =D
1577228967
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yes, so many scripts I've tried to make and had to fall back on doing the event around a selected token.
1585232467
The Aaron
Roll20 Production Team
API Scripter
Actually, when any Ping happens, shift or not.
1585245740
Spren
Sheet Author
How would you tell one ping apart from another? I accidentally ping when trying to select things to click and drag all the time so just curious how you would solve that. I love all the ideas and can think of a few myself, but maybe it would be better if there was some sort of api only ping? Like a CTRL version of the SHIFT ping, that sent an event? The Aaron said: Actually, when any Ping happens, shift or not.
1585832602
The Aaron
Roll20 Production Team
API Scripter
Spren said: How would you tell one ping apart from another? In most cases, I would have a stateful script that would look for the next ping by a player of a specific ID after they had run a particular API command.  The API would be getting ping events all the time and ignoring them (just like chat events), until they had seen the "!summon fireball" command, then when that player pinged (or a sufficient amount of time passed), the script would go back to ignoring their pings.
1710165682
Ulti
Pro
Sheet Author
API Scripter
Would be so useful!