Func guntarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Add internal names of keyval keys)
mNo edit summary
Line 1: Line 1:
{{base brush|func_guntarget}}  
{{lang|Func guntarget}}
{{brush ent|func_guntarget}}  


==Entity description==
==Entity Description==
It is a moving target that moves along a path of [[path_track]]s. It can be shot and killed.  
It is a moving target that moves along a path of {{ent|path_track}}s. It can be shot and killed.  
{{brushmodel}}
{{brushmodel}}
{{in code|class=class_c_gun_target.html CGunTarget|file=guntarget_8cpp-source.html guntarget.cpp}}
{{in code|class=class_c_gun_target.html CGunTarget|file=guntarget_8cpp-source.html guntarget.cpp}}
Line 10: Line 11:
{{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|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|Damage to Take|intn=health|integer|The amount of damage taken before this target is killed.}}
{{KV|Minimum Light Level|intn=_minlight|string|The minimum level of ambient light that hits this brush.}}
{{KV BaseEntity|brush=1}}
{{KV Targetname}}
{{KV visiblebrush}}
{{KV Parentname}}
{{KV RenderFields}}
{{KV Global}}


== Inputs ==
== Inputs ==
Line 20: Line 18:
{{IO|Stop|Stop the target from moving.}}
{{IO|Stop|Stop the target from moving.}}
{{IO|Toggle|Toggle the target between moving and stopped.}}
{{IO|Toggle|Toggle the target between moving and stopped.}}
{{I Targetname}}
{{I visiblebrush|portal2=1}}
{{I Parentname}}
{{I RenderFields}}


== Outputs ==
== Outputs ==
{{IO|OnDeath|Fires when the target is killed. {{activator|killer}}}}
{{IO|OnDeath|Fires when the target is killed. {{activator|killer}}}}
{{O Targetname}}
{{O Targetname}}

Revision as of 20:36, 13 May 2022

English (en)Translate (Translate)

Template:Brush ent

Entity Description

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

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)