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

[Help] Targeting a position rather than a token

Alright, so I've been working on a script for a few months now and am nearing the end of the coding, though one, single thing bothers me: is there ANY way to target a position with the mouse rather than a token? I already know how to deal with targeting a token, though I'd like to add the flexibility to aim for a position (especially for area of effects, which end up having additional range upon reaching their destination) without relying on tokens for the initial point. I do NOT care about how obscure or odd the method may be to accomplish, as long as it does not depend on tokens for its position. Through all my researches, it currently seem impossible to do so, though maybe there is some hope in more knowledgeable people, or simply in a feature being added in the future. If there isn't any currently? At least I won't have to keep it in mind and take my second option. About such a feature; adding the ability to target the board when targeting (returning the exact coordinates or those of the targeted grid), rather than just tokens, would be perfect, since all I need are specific coordinates to define the source of the area of effect.
I don't know for certain myself, but a possible work around might be to listen for a ping on the map from a user (hold left-click) and the output the location of the ping, then copy that information into the api call. However I don't know if there is a way to listen for player pings.
1495121242
The Aaron
Pro
API Scripter
Stephen S. and I have dug into this quite a bit in the past.  The best 2 ways we've come up with are: 1) Have your command spawn a token that the command issuer can control and ask them to position it, then use some other mechanism to execute the final step (Linking to a character and using a Token Action works well.  Stephen had a script where you deleted it when it was in the right place, which also worked well. (particularly before the API could remove things)).  Set your spawned token to isdrawing:true to have per pixel placement and no bubbles.  Leave it as isdrawing:false for grid aligned placement (Turn off player's seeing bars to keep a clean interface). 2) Ask the player to use the drawing tools to mark a location and use it's center, or whatever.  That's slightly obnoxious because of the extra steps, but you can have them indicate size and even shape that way.  Stephen had a script that looked for a particular color of drawing and always activated on creation of drawings with that color. Hope that helps.
1495121272
The Aaron
Pro
API Scripter
Kyle G. said: I don't know for certain myself, but a possible work around might be to listen for a ping on the map from a user (hold left-click) and the output the location of the ping, then copy that information into the api call. However I don't know if there is a way to listen for player pings. There isn't.  I've asked for it in the past for exactly that reason.  =/
I thank you all greatly for the confirmation. This confirms my suspicions... It'd be highly interesting if they implemented a way to target a position (I'd suggest !targetposition, to separate it from targeting tokens). Seems that, until then, I'll have to deal with either drawings or using tokens for targeting (it happened to be my plan B).
I'll be adding my suggestion to the suggestion forum.
I use pointer and target tokens to let players show where they are looking/targeting spells, etc. They are much much beter than pings, cause pings require you to be looking at the right spot at the right time and don't last long enough. <a href="http://imgur.com/a/Mkc2k" rel="nofollow">http://imgur.com/a/Mkc2k</a>
1495132921
The Aaron
Pro
API Scripter
Nice Sky HB! &nbsp;Have you integrated that with any scripts, or is it more about "drag in a marker" functionality?
The only script I use the target marker for is one that watches for changes to the chemical-blast status icon and makes an aura based on that. Very quick and simple spell radius templates. I should add cubes to it as well since those are doable.