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] It's a Trap - My tweak for remotely armed traps

1436249414

Edited 1436305889
Tom
Pro
I wanted to clarify that I didn't originally make this script, I just made some personal alterations to the original made by Stephen L. where I had additional needs. So I was setting up for the Murder's Mark Pathfinder campaign and in doing so I realized that what I really needed was slightly more than what It's a Trap does already. To that end I have added a small bit of logic that allows you to set a trigger for a single trap on the page (at the moment, might add more functionality later). You need to add a token to the GM layer akin to what you already do but for a trigger use the spanner status marker, you will need to add the padlock status marker to the trap you want to remotely activate. If a token collides with the trap prior to the trigger nothing happens but when they collide with the trigger first it will 'arm' the trap(add statusmarker cobweb) and then the trap will work as normal. It's a Trap - Triggered Traps
1436251604
Ziechael
Forum Champion
Sheet Author
API Scripter
Nice idea, when/if you find a way to have this run on multiple traps i can imagine all sorts of uses for this... i always enjoy new ways to make players suffer. For added functionality you can replace your chat output with: if(trap) { var gmnotes = trap.get('gmnotes'); gmnotes = decodeURIComponent(gmnotes); sendChat("Admiral Ackbar", "IT'S A TRAP!!! " + obj.get("name") + " should have been more careful; " + gmnotes); moveTokenToTrap(obj, trap); That allows you to populate your trap gmnotes with the trap description and damage rolls etc and have it print out to chat when triggered :)
Good idea, I had not considered that but I am using Creature Gen going forward for most if not all of my mob generation. I have updated the gist as well that section of code to include this option. As to multiple traps/triggers the only real issue I see is that you start to run out of status markers and each trigger needs a unique marker as does the trap it arms. I suppose I could go deeper and perhaps use something like the light numbers to create a keyed pair and then filter the list of traps based on that value instead of using status markers like the original code.
I updated this again just a moment ago, it now supports multiple traps using light_radius between the two tokens as a key if you will. I figured this was at least in my case a field I was unlikely to use on a trap. I am now already using gmnotes for trap roll info as per the earlier suggestion and as well I tend to run screaming from the idea of comparing against giant blocks of text unless I have no other option. I also fixed an issue where colliding with the trigger after activating the trap caused an error.
1436345692
Ziechael
Forum Champion
Sheet Author
API Scripter
Nice work Tom, i'll have to find time to put this through it's paces! I'm already imagining much fun to be had with pressure plates slamming doors shut behind the players or tripwires causing a bridge to collapse from under them etc :)
Cool, just let me know if you find anything odd. I built it originally with a very singular purpose in mind so that is all I have really tested it for, certainly there are some bugs somewhere.