Classname: | trigger_counter |
Purpose: | Triggering events with multiple or ordered triggers. |
H2 Code: | triggers.hc |
Incited by Speeed, I've finally done some work on this one, & figred
out two previously undocumented fields for this
entity, msg2 and puzzle_id, not mentioned in the
hcode help. Can be reset by trigger_counter_reset, and have triggering sequences passed to it by trigger_combination_assign.
|
target | Value is a name; Entity with matching targetname value is triggered. |
netname | Value is a string, Ordered trigger_coumters need to share a unique netname value with their triggers (not their targets), otherwise the map won't start. netname doesn't seem to be necessary for unordered trigger_counters, and is at least sometimes omitted with them in the Raven maps. |
count | must be the number of triggers until the counter fires for unordered
counting and number of triggers - 1 for ordered counting. After the
counter has been triggered "count" times (default 2), it will fire
all of it's targets and shut off, unless you specify a wait time. Notes on ordered trigger_counters:
|
wait | how long to wait after successful before giving it another try. Default is -1, meaning it works once and shuts off. If you specify a wait time, the trigger will become a multiple trigger. |
puzzle_id | Value is a name, which is targetted when the player first departs from the correct sequence. Used in egypt2 (to activate the teleport that tosses you off the floor buttons), and romeric4 (to spawn the skull wizards that appear when you don't get the right button sequence). |
msg2 | Value is a number, of the message that appears when you get the combination wrong. Appears in romeric4 with value 286 ("the sequence is incorrect"). |
mangle |
This entity has the ability to have a non-sequential sequence of
numbers as a combination using mangle. The format is like a vector,
for example, if you want the counter (ordered) to work only if the
count order of 3, 5, 7 is used, enter the value "3 5 7" (no quotes). Furthermore, a trigger_combination_assign entity can pass it's "mangle" value to trigger_counter when it uses it. This way you can have a number of different possible combinations that could be used and only one would be right (depending, say, on which path the player took). The values can be as high as you like (okay, from 1 to 65336), so you can have any number of buttons in this puzzle. (wording lifted from hcode comments via Eutectic, but I have tested it now). |
spawnflags: |
|