Teleporter Basic

From DF21 Wiki
Revision as of 05:27, 19 November 2024 by Jerethk (talk | contribs) (Behaviour)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Teleporter Basic is a working teleporter that exists in Dark Forces but was not discovered until the source code was reverse engineered.

It transports objects to a designated location.

How to use

Like teleporter chute, teleporter basic is defined on a sector in a level's INF file. The following example demonstrates the usage.

item: sector  name: my-teleporter
 seq
    class: teleporter basic
    target: dest-sector1
    move: 320 -20 135 90
 seqend

A target sector must be given.

The move command instructs the teleporter where to send objects when they enter the teleporter. The syntax is:

move: [x coordinate] [y coordinate] [z coordinate] [yaw]

Important: The Y axis is inverted (unlike with elevator stops), therefore negative values are up and positive values are down in the game world.

The destination coordinates must be inside the target sector, or teleported objects may end up "lost" in the void outside any sector.

Behaviour

Teleporter Basic will teleport all kinds of objects, including the player, enemies, and projectiles (eg. blaster bolts, thermal detonators, rockets).

Objects are teleported as soon as they enter the teleporter sector, at any height.

Because of an omission in the source code, the player's Y-location and YAW are not correctly transformed in vanilla Dark Forces and the Dark Forces Remaster; the player will emerge at the destination with the same Y-location and YAW that he entered the teleporter with. (However, if his original Y-location is above or below the destination sector, he will still end up inside the sector.) Other objects such as projectiles will be correctly teleported to the teleporter's destination Y-coordinate.

This bug has been fixed in The Force Engine, so that the player will be correctly sent to the Y-coordinate and YAW defined in the teleporter's INF code.