Trigger proximity: Difference between revisions
Jump to navigation
Jump to search
(Corrected description: works with any entity, not just players) |
(→Keyvalues: Forgot this also referred to the player instead of any entity) |
||
Line 4: | Line 4: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV|Point to Measure From|target_destination|The name of | {{KV|Point to Measure From|target_destination|The name of the target entity, the origin of which is the point to measure another entity's distance from.}} | ||
{{KV|Radius to measure within|string|The radius to which the distance should be mapped. | {{KV|Radius to measure within|string|The radius to which the distance should be mapped. Entities outside the radius will be ignored.}} | ||
{{KV Trigger}} | {{KV Trigger}} | ||
Revision as of 18:40, 6 October 2019
Template:Base brush It measures the distance of an entity within the trigger volume from a given point (and within a given radius). The NearestEntityDistance output will be 0 when the entity is at the center point, and 1 when the entity is at the radius.
Keyvalues
- Point to Measure From ([todo internal name (i)]) <targetname>
- The name of the target entity, the origin of which is the point to measure another entity's distance from.
- Radius to measure within ([todo internal name (i)]) <string>
- The radius to which the distance should be mapped. Entities outside the radius will be ignored.
|
Flags
|
Inputs
|
Outputs
- NearestEntityDistance <integer >
- Fired continuously when entities are touching the trigger volume.
The output parameter is the distance from the Point to Measure From to the nearest entity that passed the trigger filters.
The distance is mapped to the radius distance, so it will be 0 when the entity is on the point, and 1 when the entity is at the edge of the radius.
|