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

[Suggestion] Get object selection, or object select event?

I was thinking it might be nice to be able to specify what object I want to perform an API action on based on what is currently selected. It would be nice to be able to ask what graphic(s) a user has selected currently. This could be done in the form of a utility function in which you just pass the player's id or something. Perhaps it is available as a function on the player object, or as a property? Use Case: An API chat command "!mark" could be created to add a status marker to whichever token a player has selected, even if the user doesn't normally get to modify the token.
1368314053
Konrad J.
Pro
API Scripter
We definitely need this to make things easier! +1
1368351012
Alex L.
Pro
Sheet Author
It would be nice but I would guess that it is currently a client side only thing though, so its likely the server just doesn't know and as such cant tell us.
I'm not sure which I'll end up going with...an event would be more broadly useful but would really probably hammer the server in terms of the number of events sent. Also I'm not sure how I would handle the fact that there would be like 5 or 6 people all selecting things. Certainly passing it when an API command is submitted would work.
1368454884
Alex L.
Pro
Sheet Author
Riley D. said: I'm not sure which I'll end up going with...an event would be more broadly useful but would really probably hammer the server in terms of the number of events sent. Also I'm not sure how I would handle the fact that there would be like 5 or 6 people all selecting things. Certainly passing it when an API command is submitted would work. How about if its just a property of the player, something like last selected token.