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

Trouble with teleporter/autoteleporter (original thread closed)

Hey guys, I've been trying to help my DM set up some scripts and ran into trouble with this one : <a href="https://app.roll20.net/forum/post/193270/script-au" rel="nofollow">https://app.roll20.net/forum/post/193270/script-au</a>... Essentially, it's a teleporter pad system with some extra commands. The script uses 2 tokens, named (for example) tele2A and tele2B representing two ends of a teleporter with 2 'doors'. The problem I'm having is that the teleporters teleport themselves . That is to say, as soon as I name a token tele2B (assuming tele2A exists), token tele2B teleports ITSELF to the location of tele2A, and vice versa. Anyone know what the problem is?
The problem your having is actually because the examples given at the top are wrong - I had the same problem when I first starting using it. You actually need to have the token names begin with (or possibly just contain, though I haven't tried that) the word Teleport so the script knows not to move them. I'm not sure if maybe the script got updated without the documentation, or if over the last year API processes have changed where it isn't working as intended, but that should do it. You should put identifying text you want between teleport and the 2A or whatever at the end. For example, between my teleporters between areas F2 and F4 are named TeleportF2.3-2A TeleportF2.3-2B. Hope this helps!
Got it working, thanks!
Also, I found the relevant line in case anyone cares (line 24) if (obj.get("name").indexOf("Teleport") !== -1) return; //Do not teleport teleport pads!!