game_counter

A game_counter counts the triggers it gets, and fires its target when the count reaches its limit.
A trigger with the use type On or Toggle adds 1, Off takes 1 away, and Set puts in the
number the trigger brings, such as the one a game_counter_set sends.
Attributes
targetnameTriggering the entity changes the count. See Common keys.
targetNames the entities to trigger with the use type Toggle when the count reaches Limit Value, and passes on the activator of the last trigger.
masterNames a master, and while the master is off, triggering the counter does nothing.
fragsSets the count the counter starts at, and goes back to with Reset On fire.
0healthSets the count at which the counter fires its target.
If you leave this key empty, it is 0, so counting up never fires it, and with Fire if over limit, every count fires it.
10Flags
1Remove On fireThe counter is removed after it fires its target
2Reset On fireAfter it fires its target, the count goes back to Initial Value. This flag is set by default
Notes
- It fires its target at once, because it has no delay and no KillTarget
- A key that takes a number, which the editor marks with [LR], can name a
game_counterand reads its count, and acalc_eval_numbercan store its result in one
See also
game_counter_set- sets a counter to a numbergame_number- holds a number without a limittrigger_counter- a brush trigger that fires after a number of touches- game_counter on TWHL - the Half-Life entity
Changes since 1.38
- You can use the new flag Fire if over limit
- Keys that take a number can read a
game_counter
