This article's documentation is for anything that uses the Source engine. Click here for more information.

Func guntarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Availability: Location)
m (Substituted IO templates)
 
(25 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{wrongtitle|title=func_guntarget}}
{{LanguageBar}}
{{CD|CGunTarget|file1=guntarget.cpp}}
{{tabs|Func guntarget|goldsrc=1|source=1|main=source}}
{{this is a|brush entity|name=func_guntarget}}
It is a moving target that moves along a path of {{ent|path_track}}s. It can be shot and killed.
__NOTOC__
== Keyvalues ==
{{KV Targetname}}
{{KV|Speed (units per second)|intn=speed|integer|The speed at which the target moves along its path.}}
{{KV|First stop target|intn=target|target_destination|The name of the first path_track entity in the path that this target should follow.}}
{{KV|Damage to Take|intn=health|integer|The amount of damage taken before this target is killed.}}


==Entity Description==
== Inputs ==
This is a moving target that moves along a path of [[path_track]]s. It can be shot and killed.  
{{I|Start|Start the target moving.}}
{{I|Stop|Stop the target from moving.}}
{{I|Toggle|Toggle the target between moving and stopped.}}


==Availability==
== Outputs ==
{{in game|brush}} {{game-base}}
{{O|OnDeath|Fires when the target is killed. {{activator|killer}}}}
{{in code|class=CGunTarget|file=guntarget.cpp}}


==Keyvalues==
== See Also ==
*{{kv targetname}}
* {{ent|path_track}}
*{{kv parentname}}
*{{kv renderfields}}
*{{kv global}}
*'''speed'''
:<integer> The speed at which the target moves along its path.
*'''target'''
:<target_destination> The name of the first path_track entity in the path that this target should follow.
*'''health'''
:<integer> The amount of damage taken before this target is killed.
*'''_minlight'''
:<string> The minimum level of ambient light that hits this brush.
 
==Inputs==
*{{i targetname}}
*{{i parentname}}
*'''Start'''
:Start the target moving.
*'''Stop'''
:Stop the target from moving.
*'''Toggle'''
:Toggle the target between moving and stopped.
 
==Outputs==
*{{o targetname}}
*'''OnDeath'''
:Fires when the target is killed.
 
[[Category:Entities]][[Category:Brush Entities]]

Latest revision as of 21:45, 19 April 2025

English (en)Translate (Translate)
C++ Class hierarchy
CGunTarget
CBaseToggle
CBaseEntity
C++ guntarget.cpp

func_guntarget is a brush entity available in all Source Source games. It is a moving target that moves along a path of path_tracks. It can be shot and killed.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Speed (units per second) (speed) <integer>
The speed at which the target moves along its path.
First stop target (target) <targetname>
The name of the first path_track entity in the path that this target should follow.
Damage to Take (health) <integer>
The amount of damage taken before this target is killed.

Inputs

Start
Start the target moving.
Stop
Stop the target from moving.
Toggle
Toggle the target between moving and stopped.

Outputs

OnDeath
Fires when the target is killed. (!activator is the killer)

See Also