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

[Script] Areas of Effect

1496950821
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Restarting the API shouldn't clear the global state variable. :/
Ah, well then I'm not sure what's going on. It does state so in the wiki, unless I'm misunderstanding this: Whenever you click the "Save Scripts" button, the sandbox for your game will be restarted (losing any previous state data) and use the new script modifications you just made. This also applies if you add a new script, delete a script, or toggle a script to enable/disable it. It does seem consistent with what I'm noticing, which is that all scripts are losing their stored data when I either: enable a script, disable a script, add a new script, or restart the api.
1496957712
The Aaron
Pro
API Scripter
I'll fix that wording on the wiki.  It doesn't mean literally the state object.  It just means runtime only data the script is keeping in memory.
1496957937
The Aaron
Pro
API Scripter
Whenever you click the "Save Scripts" button, the sandbox for your game will be restarted (losing any in-memory data which hasn't been persisted in the state object or in Roll20 objects) and use the new script modifications you just made.
Right. Very much seems like whatever issue I'm having isn't limited to this script, is there another suitable place for this discussion to be continued to prevent derailing this thread too much?
1496958500
The Aaron
Pro
API Scripter
If you want to send me an invite and GM me, I'd be happy to pop in and see if I can track it down for you.
1496970429

Edited 1496970527
Jedd
KS Backer
Marketplace Creator
Is there a way to specify a blast size and start point? For example if one of my players casts Thunderwave (15x15 cube adjacent to the caster) and selects a target 5 feet away, AoE creates a 5x5 square instead of 15 by 15. Additionally, while I appreciate how all blasts are centered on the originating token (for bursts and different directions and such), I'd like the option to move them a half unit forward, so they begin in the square adjacent to the caster, instead of halfway in the caster's square and halfway in the target's square. Love the script as a whole! Thanks for making it!
1496971295
The Aaron
Pro
API Scripter
Arne's issue is a problem with his API instance. I've asked for dev assistance.
1496976495
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Jedd said: Is there a way to specify a blast size and start point? For example if one of my players casts Thunderwave (15x15 cube adjacent to the caster) and selects a target 5 feet away, AoE creates a 5x5 square instead of 15 by 15. Additionally, while I appreciate how all blasts are centered on the originating token (for bursts and different directions and such), I'd like the option to move them a half unit forward, so they begin in the square adjacent to the caster, instead of halfway in the caster's square and halfway in the target's square. Love the script as a whole! Thanks for making it! Right now the way to specify a start point is to have some sort of pointer/crosshair object that you control and set that as the target for a burst effect with a radius appropriate for your blast. Unfortunately at the time of this writing, there isn't a way to just click any arbitrary point on a map to use as the effect origin since targeting macros the script is built upon don't currently support that. 
1497287309
Jedd
KS Backer
Marketplace Creator
What if the token clicked specifies the direction of the blast, not the size? (and have the size determined by a value similar to bursts...)
1497289467
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Something like that could work, but it's not implemented right now.
1497391714
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Update: Areas of Effect v1.5 is now unofficially available. You can get it here:&nbsp; <a href="https://github.com/Cazra/roll20-api-scripts/blob/A" rel="nofollow">https://github.com/Cazra/roll20-api-scripts/blob/A</a>... This version includes the following updates:&nbsp; Line/Cone button: Point your token in the direction of the effect and specify the distance. Blast button: Project a D&D 4th edition style blast in the direction your token is facing.