Activators

Activators

Classnames: trigger_activate, trigger_deactivate
Purpose: Making stuff happen on a once-only basis (mostly puzzles, I suspect).
H2 Code: triggers.hc
fields required: target
Toggles the activation state of a triggering entity when associated brush is touched. I've gotten it to work for buttons, teleports and trigger_once's, but not pressure plates (but I don't know whether it doesn't or I've just been incompetent). Not sure why there are two entity types with identical functions; I suspect that they changed their minds about how to think about things and kept the two names in order to avoid rewriting code.

Lot's more to me done on this; Eutectic's list has been especially useful.

Fields

target Value is a name; activation state of trigger entity with matching targetname value is toggled (for simple activation, set the TRIGGER_ONCE flag of the trigger_activate and the DEACTIVATED flag of the trigger to be activated; toggling activation states could make things excessively confusing). REQUIRED (at least if the thing is to be of a any use ...)
soundtype Value is one of the following numbers:
  • 1 -- secret sound
  • 2 -- bell (default)
  • 3 -- metal sound
A sound will always be produced if there is a message-value, so silent activators shouldn't have one.
message Value is a number, indicting the message to be displayed when the activator fires.
delay Value is a number; how long trigger fires targets after being used.
wait Value is a number; low long it takes (sec) for activator to be re-fireable (default = .2).
puzzle_piece1..4 (4 fields). Value is the name of a puzzle piece; these are listed in puzzles.txt. Trigger won't fire until player has all the required pieces.
no_puzzle_msg Value is a number, indicating the message to be displayed when player lacks required puzzle pieces.
targetname Value is a name, targetted by another activator; use DEACTIVATED spawnflag to start in deactivated state. Activating activators sounds like bug city to me ...
killtarget remove the target after having triggered it once (from Eutectic's list, haven't tested it).
netname unique name used for linking to other entities (Eutetic, untested by me).
aflag order number used in sequence triggering (Eutectic, untested by me).
style Value is a number, used in controlling banks of lights. This is used in tibet2 of Portal of Praevus, but I haven't checked it out.
spawnflags: Add up the numbers for the properties you want, & set the sum as the spawnflags value.
  • 1 = ONCE : if set, the trigger will fire once & then disappear.
  • 2 = RELAY : don't know (neither does Eutectic)
  • 8 = DEACTIVATED : must be activated first (not tested by me).

Back to the list.