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

Change Range Picker SendChat Appearence

Hi everyone, I'm currently using Range Picker Api (this one&nbsp; <a href="https://gist.github.com/watjep/8121127" rel="nofollow">https://gist.github.com/watjep/8121127</a> ) in a game. I was trying to make the result appear in a Power Card, but I've find that impossible due to string 43: sendChat("","Range between "+name1+" and "+name2+" = " + dist); So, I was wondering to resolve it in a different way: to make the chat message more evident, there's a way to make the sendChat appear with a template of my choice? How do I have to change the API script? I'm not exactly pratical with JAVA script. I'm talking of something like that. That's another API that I use:
1617891240
The Aaron
Roll20 Production Team
API Scripter
Something like: sendChat ( "" , "!power --Range between " + name1 + " and " + name2 + "|" + dist ); should let you call powercards.
It works! Thank you so much Aaron. Super useful as always.
1617892431
The Aaron
Roll20 Production Team
API Scripter
Sweeeeeet.&nbsp; =D&nbsp; No problem!
Wait. What does this API do? And how does it look after the change the Aaron suggested?
1617907999

Edited 1617911491
The API calculates the distance between two tokens. Before the suggestion, it simply sent a chat message in normal text. Now, with Aaron's one, and with mine few further modifications looks like that (Red Circle) &nbsp;
That's cool. If only powercards could read range to apply automatic modifiers.
1618030958
David M.
Pro
API Scripter
Peacekeeper, the latest version of Scriptcards can so this, although it uses a lot of advanced syntax to make it work. See this example of a Fireball spell finding all tokens in range to roll saves and apply damage, and read this description of version 1.1.2 for details. Fair warning, though, it might be a lot to take in at once if you have never used even basic scriptcards before. It will help that you are already familiar with Powercards, but it's still pretty advanced usage and may seem somewhat arcane at first glance.