Jump to content

A_LookForBetter

From SRB2 Wiki

A_LookForBetter is an action that looks for a player and sets them as the new target. The upper 16 bits of Var1 can be used to specify a distance limit in fracunits. Only players within that limit can be targeted. If the lower 16 bits are set to 0, the actor only looks in front of itself, otherwise it looks all around. Once it has a target, it keeps track of it until a better one can be found.


Attributes Use
Var1 Upper 16 bits: Distance limit

Lower 16 bits: 0 – looks only in front; 1 – looks all around

Var2 unused

  Actions – Checking [view]
A_BubbleCheckA_CheckAmbushA_CheckHealthA_CheckHeightA_CheckRandomA_CheckRangeA_CheckRingsA_CheckTargetRingsA_CheckThingCountA_CheckTotalRingsA_CheckTrueRangeA_ChickenCheckA_LookA_LookForBetterA_SearchForPlayers