
As the title suggests, I want to trigger a script when I select a token. I know selected objects are stored in msg.selected when a message is sent. Is there another way to access this so I can avoid that step?
If not, I'm trying a work around where a setInterval function sends a message every second as a player and then that message event checks the msg.selected array to see if it contains the token I want. However, the msg.selected for this technique keeps coming up undefined, even though I sendChat(player.id, "!checkSelected").
Any thoughts or ideas are appreciated.
If not, I'm trying a work around where a setInterval function sends a message every second as a player and then that message event checks the msg.selected array to see if it contains the token I want. However, the msg.selected for this technique keeps coming up undefined, even though I sendChat(player.id, "!checkSelected").
Any thoughts or ideas are appreciated.