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

Is it possible to render custom auras over mouse cursor?

I am looking to create a spell casting class and one of the features is when a char issues an api command, say !cast fireball, it will prompt for a location (square) to center the effect on. What I would like to do if it is possible is render an aura around the cursor so they can see the affected tokens for any given location. As they move the mouse it would find the square directly under the mouse and render a predetermined AoE aura around it. This would require the ability to hook into the "onMouseMove" event and get the location of the cursor in relation to the tiles as well as an "onMouseClick" click event to destroy the aura after they have chosen the target location.
1410287952
Lithl
Pro
Sheet Author
API Scripter
No, the API cannot detect the location of the mouse. You would need to input the location with the API command, or target a token. One thing you could do is have a "spell target" token that anyone can control. They'd position the token, use the API command, and the spell effect would be located at the spell target (or use @{target} in the API command, and the "spell target" token lets them target spaces instead of allies and opponents).