Trigger teleport

Trigger teleport

Classname: trigger_teleport
Purpose: Rapid transit.
H2 Code: triggers.hc
fields required: target
Upon contact, shifts toucher to targetted info_teleport_destination entity.

Fields

target Value is a name; the targetname value of a trigger activate entity (ordinary buttons, etc. don't seem to work). Teleport noise is produced regardless of activation.
spawnflags:
  • 1 - PLAYER_ONLY: won't shift monsters.
  • 2 - SILENT: No teleporter hum (movement sound still produced).
  • 4 - DEACTIVATE: won't work before activation by a targetting trigger_activate entity.

Cool design idea from code comments:

If you like, you can use a trigger_message_transfer to change the target of the teleporter so it can go to different places at different times. Several can be used to make it a "destination selectable" teleporter based on which button was pressed or how many times the same button was pressed before the teleporter is used. In this respect, the possibilities are endless.

Tiglari sez: Rotating teleport destinations can be done, although there are some complexities. I haven't figured out how to use the button to select the destination, because what the trigger_message_transfer does is change the target-value of whatever fires it, which would be the button, not the teleport whose destination we want to change. But maybe there's some trick I haven't seen yet. I think, however, that it might not be too hard to produce an entity that would change the target of whatever entity it targets, but I haven't done it yet and there could be unexpected difficulties.
Back to the list.