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 (Changed parameters of {{this is a}} to comply with the updated version. This action was performed by a bot.)
(badly moved multipage)
Line 1: Line 1:
{{LanguageBar}}
{{tabs|Func guntarget|goldsrc=1|source=1|main=source}}
{{tabs|Func guntarget|goldsrc=1|source=1|main=source}}
{{this is a|brush entity|name=func_guntarget}}
{{this is a|brush entity|name=func_guntarget}}
{{code class|CGunTarget|guntarget.cpp}}
{{code class|CGunTarget|guntarget.cpp}}
{{MultiPage| title = func_guntarget }}
<noinclude></noinclude>
 
==Entity Description==
It is a moving target that moves along a path of {{ent|path_track}}s. It can be shot and killed.
{{brushmodel}}
 
== Keyvalues ==
{{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.}}
{{KV BaseEntity|brush=1}}
{{KV visiblebrush}}
 
== Inputs ==
{{IO|Start|Start the target moving.}}
{{IO|Stop|Stop the target from moving.}}
{{IO|Toggle|Toggle the target between moving and stopped.}}
{{I visiblebrush|portal2=1}}
 
== Outputs ==
{{IO|OnDeath|Fires when the target is killed. {{activator|killer}}}}
{{O Targetname}}

Revision as of 05:44, 14 July 2024

English (en)Translate (Translate)

func_guntarget is a brush entity available in all Source Source games.

C++ In code, it is represented by theCGunTargetclass, defined in theguntarget.cppfile.


Entity Description

It is a moving target that moves along a path of path_tracks. It can be shot and killed. Template:Brushmodel

Keyvalues

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.
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{Brush rendering note}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.
Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.

Inputs

Start
Start the target moving.
Stop
Stop the target from moving.
Toggle
Toggle the target between moving and stopped.
SetDamageFilter <targetnameRedirectInput/string>
Sets a filter for this entity for when it receives damage.
EnableDamageForces
Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).
DisableDamageForces
Prevents the entity from being pushed by damage done to it.
Todo: move/mention at proper place

Outputs

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