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

Detect playerId from a change:graphic event?

If a graphic changes, is there a way to detect who changed it? In this case, it's "controlled by" everyone, so I can't determine this based on "who was allowed" to change it. I don't see anything in the event that would help with this, and I also don't see a way to see which objects a player is currently selecting.
1427201796
Lithl
Pro
Sheet Author
API Scripter
No, there is no means to detect who triggered a change event.
1427208590
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Its hacky... but you could use a variation of the token lock script. Everyone has access but everything is locked... but it can be selected. Token action used to take control... (you are now the only one with access.) Do whatever. The graphic event will then know the guilty person (only one person has control.) Token action to drop control... Everyone has access but everything is locked... but can be selected.
1427213129
The Aaron
Pro
API Scripter
Clever Idea, Stephen. This would be a great suggestion. I'd totally upvote it.
Stephen S. said: Its hacky... but you could use a variation of the token lock script. Everyone has access but everything is locked... but it can be selected. Token action used to take control... (you are now the only one with access.) Do whatever. The graphic event will then know the guilty person (only one person has control.) Token action to drop control... Everyone has access but everything is locked... but can be selected. So if I understand this correctly, you're saying that I should use a message event to identify a player, and "encourage" the player to send such a message by making it otherwise difficult to interact with the token? And then implement association logic between the token and the command so that things tie together cleanly? Makes sense - just want to make sure I'm catching your intent.
1427231357
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
I would start with this: [Script] TokenLock some variation of that. 1) The token is locked and can't move however anyone can select it. 2) When you select it... it has a token action "grab" or "take control." 3) When clicked API gives you and only you control and unlocks it. 4) Do whatever.... Now any event with that graphic can only belong to one person. 5) That event would result in it locking again and being control by all. 6) Back to step 2. It would be a fairly specific application I would think... puzzle or what not.
Gotcha - thanks