Point entity finder: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Changed format of some sections ;Removed obsolete templates (this is a neat entity))
(-added class hierarchy, internal names, cleanup)
Line 1: Line 1:
{{base point|point_entity_finder|since=Left 4 Dead}} When given the<code>FindEntity</code>input, it finds an appropriate entity based on the given criterias, and pass the result as the{{ent|!caller}}in the<code>OnFoundEntity</code>output.
{{CD|CPointEntityFinder|file1=point_entity_finder.cpp}}
{{entity|type=e0|since=Left 4 Dead|point_entity_finder}} When given the <code>FindEntity</code> input, it finds an appropriate entity based on the given criteria, and pass the result as the {{ent|!caller}} in the <code>OnFoundEntity</code> output.


== Keyvalues ==
== Keyvalues ==
{{KV|Filter Name|filterclass|Filter to use to narrow set of find-able entities. See [[filter_activator_name]] for more explanation.}}
{{KV|Filter Name|intn=filtername|filterclass|Filter to use to narrow set of find-able entities. See [[filter_activator_name]] for more explanation.}}
{{KV|Reference Entity|target_destination|Name of the entity to use for search method distance comparisons.  If left blank, the entity will use itself.}}
{{KV|Reference Entity|intn=referencename|target_destination|Name of the entity to use for search method distance comparisons.  If left blank, the entity will use itself.}}
{{KV|Search Method|choices|After filtering down the entities to find, if there are multiple valid candidates, this determines which entity gets sent under the{{ent|!caller}}name.
{{KV|Search Method|intn=Method|choices|After filtering down the entities to find, if there are multiple valid candidates, this determines which entity gets sent under the{{ent|!caller}}name.
:* 0 : Nearest
:* 0 : Nearest
:* 1 : Farthest
:* 1 : Farthest
:* 2 : Random
:* 2 : Random
}}
}}
{{KV BaseEntity|base=1}}
{{KV Targetname}}


== Inputs ==
== Inputs ==
{{IO|FindEntity|Start a search on an entity that meets the specified criteria. Fires the<code>OnFoundEntity</code>output and pass the found entity under the{{ent|!caller}}name.}}
{{IO|FindEntity|Start a search on an entity that meets the specified criteria. Fires the<code>OnFoundEntity</code>output and pass the found entity under the{{ent|!caller}}name.}}
{{I BaseEntity|base=1}}


== Outputs ==
== Outputs ==
{{IO|OnFoundEntity|When a search from the<code>FindEntity</code>input found a valid entity. The found entity is passed under the{{ent|!caller}}name.}}
{{IO|OnFoundEntity|When a search from the<code>FindEntity</code>input found a valid entity. The found entity is passed under the{{ent|!caller}}name.}}
{{O BaseEntity|l4d=1}}

Revision as of 04:43, 21 July 2023

C++ Class hierarchy
CPointEntityFinder
CBaseEntity
C++ point_entity_finder.cpp

Template:Entity When given the FindEntity input, it finds an appropriate entity based on the given criteria, and pass the result as the !caller in the OnFoundEntity output.

Keyvalues

Filter Name (filtername) <filter>
Filter to use to narrow set of find-able entities. See filter_activator_name for more explanation.
Reference Entity (referencename) <targetname>
Name of the entity to use for search method distance comparisons. If left blank, the entity will use itself.
Search Method (Method) <choices>
After filtering down the entities to find, if there are multiple valid candidates, this determines which entity gets sent under the!callername.
  • 0 : Nearest
  • 1 : Farthest
  • 2 : Random
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

Inputs

FindEntity
Start a search on an entity that meets the specified criteria. Fires theOnFoundEntityoutput and pass the found entity under the!callername.

Outputs

OnFoundEntity
When a search from theFindEntityinput found a valid entity. The found entity is passed under the!callername.