Point entity finder: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with '{{base point multi|point_entity_finder|game1=Portal 2|game2=Alien Swarm|game3=Left 4 Dead 2|game4=Left 4 Dead}} == Entity description == An entity that will find an entity and p…')
 
(Replaced OutEntity with OnFoundEntity, and added a description to the Search Method keyvalue, and a few other minor things.)
Line 1: Line 1:
{{base point multi|point_entity_finder|game1=Portal 2|game2=Alien Swarm|game3=Left 4 Dead 2|game4=Left 4 Dead}}
{{base point|point_entity_finder|since=Left 4 Dead}}


== Entity description ==
== Entity description ==
An entity that will find an entity and pass it along as the !Caller with the <code>OutEntity</code> output.  Requires using !Caller as the parameter on the input.
An entity that will find an entity and pass it along as the [[!caller]] with the <code>OnFoundEntity</code> output.


== Keyvalues ==
== Keyvalues ==
{{KV|Filter Name|filterclass|Filter to use to narrow set of findable entities. See [[filter_activator_name]] for more explanation.}}
{{KV|Filter Name|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 when evaluating criteria.  For example, when using ''Nearest'', this is the entity that distance will be measured from.  If left blank will use the point_entity_finder.}}
{{KV|Reference Entity|target_destination|Name of the entity to use when evaluating criteria.  If left blank, the entity will use itself.}}
{{KV|Search Method|choices}}
{{KV|Search Method|choices|After filtering down the entities to find, if there are multiple entities that it has found, this determines which entity gets sent as the [[!caller]].}}
* 0 : Nearest
* 0 : Nearest
* 1 : Farthest
* 1 : Farthest
Line 14: Line 14:


== Inputs ==
== Inputs ==
{{IO|FindEntity|Find an entity that meets the specified criteria.  Will fire <code>OutEntity</code> if found and pass the entity as !Caller.}}
{{IO|FindEntity|Find an entity that meets the specified criteria.  Will fire <code>OnFoundEntity</code> output and pass the entity as the [[!caller]].}}
{{I Targetname}}
{{I Targetname}}


== Outputs ==
== Outputs ==
{{IO|OnFoundEntity|Fired when <code>FindEntity</code> is input and an entity was found. Passes the found entity as !Caller.}}
{{IO|OnFoundEntity|Fired when <code>FindEntity</code> input was sent and a entity was found. Passes the found entity as the [[!caller]].}}
{{O Targetname}}
{{O Targetname}}

Revision as of 19:42, 28 July 2017

Template:Base point

Entity description

An entity that will find an entity and pass it along as the !caller with the OnFoundEntity output.

Keyvalues

Filter Name ([todo internal name (i)]) <filter>
Filter to use to narrow set of find-able entities. See filter_activator_name for more explanation.
Reference Entity ([todo internal name (i)]) <targetname>
Name of the entity to use when evaluating criteria. If left blank, the entity will use itself.
Search Method ([todo internal name (i)]) <choices>
After filtering down the entities to find, if there are multiple entities that it has found, this determines which entity gets sent as the !caller.
  • 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
Find an entity that meets the specified criteria. Will fire OnFoundEntity output and pass the entity as the !caller.


Outputs

OnFoundEntity
Fired when FindEntity input was sent and a entity was found. Passes the found entity as the !caller.