Editing CheckProximity
From Eternity Wiki
Jump to navigationJump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
==ACS function== | |||
''boolean'' '''CheckProximity'''(''int tid'', ''str classname'', ''fixed distance''[, ''limit''[, ''flags'']]) | |||
Counts the actors of type ''classname'' close to a tagged thing, returning TRUE if they're more (or less, depending on ''flags'') than a given ''limit''. It can also have the side effects (if ''flags'' set this way) to change a monster's target, among other things. | |||
===Parameters=== | |||
*''tid'': [[TID]] of thing to check proximity of actors against. Only works for one tagged thing. | *''tid'': [[TID]] of thing to check proximity of actors against. Only works for one tagged thing. | ||
*''classname'': class of actors to look for near the tagged thing. Supports both [[EDF]] names and ZDoom compatibility names. | *''classname'': class of actors to look for near the tagged thing. Supports both [[EDF]] names and ZDoom compatibility names. | ||
Line 18: | Line 22: | ||
:*'''CPXF_CLOSEST''' or 1024: if setting target or tracer, pick the closest actor found in ''distance'' range. | :*'''CPXF_CLOSEST''' or 1024: if setting target or tracer, pick the closest actor found in ''distance'' range. | ||
:*'''CPXF_CHECKSIGHT''' or 4096: only pick actors to which a line of sight from tagged thing exists. | :*'''CPXF_CHECKSIGHT''' or 4096: only pick actors to which a line of sight from tagged thing exists. | ||
===Return value=== | |||
TRUE if the conditions have been met. | |||
===See also=== | |||
*[[CheckSight]] | *[[CheckSight]] | ||
*[[ACS functions]] | |||
[[Category:ACS]] |