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] BlastTarget Token

1389548366

Edited 1389798196
This script creates an aura on a targeting token named "BlastTarget" via setting a status icon on the token. The size of the aura is determined by the value set on the icon. Video Link: <a href="https://plus.google.com/109659591453191902524/posts/UhgBXTZeyCC" rel="nofollow">https://plus.google.com/109659591453191902524/posts/UhgBXTZeyCC</a> Update Jan 15 2014: Bug fix to remove the aura completely when using the 0 (zero) key. It was filling just the one square. // -- SETTINGS -- // Blast Icon - Set to the name of the icon you want to use to determine // the size of the aura on BlastTarget. Suggestions include chemical-bolt, // grenade, radioactive, or rolling-bomb. var BlastIcon = "grenade"; on("change:token", function(obj, prev) { // Exit the script if the object is not a token or is a drawing... if(obj.get("subtype") != "token" || obj.get("isdrawing") == "true") return; // Check for the specified status icon on the BlastTarget and add an aura equal // to the number set on the status. if (obj.get("name") == "BlastTarget") { var Status = obj.get("statusmarkers"); var StatusIndex = Status.indexOf(BlastIcon); var AuraRadius = Status.substring(StatusIndex + BlastIcon.length + 1); if (StatusIndex != -1) { if (AuraRadius == "") AuraRadius = "1"; obj.set("aura1_radius", AuraRadius); obj.set("aura1_color", "#990000"); obj.set("aura1_square", true); obj.set("showplayers_aura1", true); } if (StatusIndex == -1 || AuraRadius == "0") { obj.set ("aura1_radius", ""); } } });
1389551850

Edited 1389553174
Ada L.
Marketplace Creator
Sheet Author
API Scripter
Very cool script. This will definitely be useful, even in a non DnD 4 campaign with some small modifications. :) Something similar that would be really neat is a script that shows a cone-shaped blast area, like that for a breath weapon. That would definitely be challenging to implement though.
Impossible to implement with auras. You could do it with creating, copying, and destroying a 70px x 70px transparent image.
Update Jan 15 2014: Bug fix to remove the aura completely when using the 0 (zero) key. It was filling just the one square.