Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Script:Auto Teleporting and Chat Based Teleporting

From Roll20 Wiki

Revision as of 17:29, 13 January 2015 by Brian (Talk | contribs)

Jump to: navigation, search
API ScriptAuthor: Josh
Version: 1.3
Last Modified: 2013-06-10
Code: Auto Teleporting and Chat Based Teleporting
Dependencies: None
Conflicts: None

Auto Teleporting and Chat Based Teleporting allows the GM to teleport one or more characters to a location based on a token placed on the GM layer of the map. Manual teleportation is achieved with the API command !Teleport. Automatic teleportation is toggled with !AUTOTELEPORTER. Both commands are GM-only.

Contents

Syntax

!Teleport <target>, <characters>
!AUTOTELEPORTER
Formally:

S

→ !Teleport target

, characterList


target

string

characterList

character

characters


character

string

characters

→ ε

characters

→ , characterList


Parameter Values
target The name of an object on the GM layer used as the teleport target location.
characters A comma-separated list of character names to teleport.

Installation

There are two configuration variables near the top of the script. You may alter them to customize the script functionality:

  • Teleporter.AUTOTELEPORTER – The default state of the auto teleportation behavior. Use true or false. The autoteleporter state will not persist between sessions, so you should set this value to the state you intend to use most often.
  • Teleporter.GMName – Set to the display name of the user with permission to use the teleportation commands.

Manual Teleport Setup

In order to teleport a token somewhere, you must have a named object on the GM layer. The object's name will be used as the first parameter to the !Teleport API command.

Automatic Teleport Setup

In order to automatically teleport tokens, you must have objects on the GM layer with a specific naming scheme. Each object's name should end with a number in the range [2, 9] followed by a capital letter in the range [A, I]. Linked teleporters need to have identical names, with the exception of the capital letter at the end, which should be unique among the set of otherwise-identical objects.

The number in the object's name indicates how many teleporters exist in the sequence. The letter in the object's name indicates what position in the sequence the object is located at. For example, a three-teleporter sequence might be named "stair3A", "stair3B", and "stair3C". Automatically teleporting tokens will loops through the sequence as they step on the squares that the objects are located on.

You can also create one-directional teleporters by having an incomplete sequence. If you have "stair3A" and "stair3B" but there is no object on the GM layer named "stair3C", tokens will teleport from A to B, but will not teleport from B to anywhere else.

Changelog

v1.3 (2013-06-10)

  • Release