ScriptTeleport

From Amulets & Armor Wiki
Jump to: navigation, search

Teleport ( [X], [Y], [Z])

Teleports the player, or players, to the destination based on the coordinates. This command should only be run in personal script #'s 201-255.

Arguments

X - X coord in map.

Y - Y coord in map.

Z - (Not Used. Player always appears on ground)

Example

200:    // teleport to druidtown
   Teleport(244, 1730, 0);
   End()

Troubleshooting

There are a couple common issues with teleporters. They are simple to solve and usually require map changes, not scripting changes.

Teleporter doesn't work

The screen flashes, the effect plays, but the player does not move. This is caused by another solid entity standing on the destination or the destination pointing outside of the map. Usually it's because a monster has walked onto it, but can also be caused by rocks or columns accidentally being placed in the way.

Use of "blocks monster" line defs near the area can prevent monsters from path finding to it. This is not fool-proof as monsters can be knocked past these line defs. Putting a door between the teleporter and monster helps. Monsters don't like to open doors if there is a "blocks monster" line def in the way. Making the destination point to the top of a tall sector is a great way to keep monsters from stepping on it.

Teleporter loops infinitely

The screen flashes continuously and the player gets stuck. This is caused by the player appearing in a sector too low for them to stand in, which includes doors that are closed. If players have water walk activated in a water room with a low roof, this can happen. Another common cause is accidentally putting an "Alter Sector Door" inside of a room. This causes the whole room to act like a door.


Back to Scripting Main Page