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

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…')
 
 
(10 intermediate revisions by 8 users not shown)
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}}
{{CD|CPointEntityFinder|file1=point_entity_finder.cpp}}
 
{{This is a|point entity|name=point_entity_finder|since=Left 4 Dead}} {{also|{{mapbase}}{{gmod}}}} 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.
== 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.


== Keyvalues ==
== Keyvalues ==
{{KV|Filter Name|filterclass|Filter to use to narrow set of findable 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|Search Method|choices}}
* 0 : Nearest
* 1 : Farthest
* 2 : Random
{{KV Targetname}}
{{KV Targetname}}
{{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|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|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
:* 1 : Farthest
:* 2 : Random
}}


== 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.}}
{{I|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 Targetname}}


== Outputs ==
== Outputs ==
{{IO|OnFoundEntity|Fired when <code>FindEntity</code> is input and an entity was found. Passes the found entity as !Caller.}}
{{O|OnFoundEntity| activator = activator of the FindEntity input
{{O Targetname}}
| caller = the found entity
|When a search from the<code>FindEntity</code>input found a valid entity.}}
 
[[Category:Mapbase entities]]
[[Category:Mapbase point entities]]
 
== See also ==
* [[Left 4 Dead 2/Scripting/Script Functions#CEntities]]
* [[Team Fortress 2/Scripting/Script Functions#CEntities]]

Latest revision as of 02:45, 24 April 2025

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

point_entity_finder is a point entity available in all Source Source games since Left 4 Dead Left 4 Dead. (also in MapbaseGarry's Mod) 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

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

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 !caller name.
  • 0 : Nearest
  • 1 : Farthest
  • 2 : Random

Inputs

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

Outputs

OnFoundEntity
!activator = activator of the FindEntity input
!caller = the found entity
When a search from theFindEntityinput found a valid entity.

See also