This article's documentation is for the "GoldSrc" engine. Click here for more information.

game_counter

From Valve Developer Community
Jump to navigation Jump to search
edit

game_counter is a point entity available in all GoldSrc GoldSrc games. This entity keeps an internal value of how many times it has been triggered, and when it reaches a specified value, it will trigger another entity.

Key Values

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Target:
Target (target) <targetname>
The targetname of an entity this entity will trigger when activated.

TargetX:

Delay before trigger (delay) <integer>
Delay in seconds before firing the targeted entity.
Killtarget (killtarget) <targetname>
Entity to remove when activated.


Master (master) <targetname>
Name of a master entity.
Initial Value (frags) <integer>
Sets the value that the game_counter should start at.
Limit Value (health) <integer>
Sets the value that the game_counter must reach before triggering its Target.

Flags

Remove On fire : [1]

If enabled, the game_counter will be removed once it has triggered its Target.

Reset On fire : [2]

If enabled, once the game_counter has triggered its Target, it will reset its value back to the Initial Value. This will allow it to be used repeatedly, and will trigger its Target each time it reaches the Limit Value. If not enabled, a game_counter_set will be necessary to return the game_counter to below the trigger value.

See also