Function; Player_FillProximitySobGroup - HWRM/KarosGraveyard GitHub Wiki

Player_FillProximitySobGroup(<sSobGroupNameOut>, <iPlayerIndex>, <sSobGroupName>, <fDistance>)

Description

Puts all active ships belonging to <iPlayerIndex> that are within <fDistance> of <sSobGroupName> into <sSobGroupNameOut>.
Returns true if there is at least one ship in <sSobGroupNameOut>; false if there is none.
Note: if sSobGroupName belongs to iPlayerIndex, it is put in sSobGroupNameOut. --SunTzu

Example

Player_FillProximitySobGroup("tempSobGroup", 0, "Patrol"..i, 5000)
if (Player_FillProximitySobGroup("tempSobGroup", 0, "EnemyCarrier", 5000) == 1) then

...code...

end

Arguments

<sSobGroupNameOut>: the name of the sobgroup to place ships into. This sobgroup must be created before the function is called.
<iPlayerIndex>: the index number of the player.
<sSobGroupName>: the name of the sobgroup to check the distance against.
<fDistance>: the distance (radius) from <sSobGroupName> that ships must lie within.

Related Pages

Function Reference

Gametype Scope

SCAR (SCripting at Relic) Reference

Comments

Page Status

Updated Formatting? Initial
Updated for HWRM? Initial

⚠️ **GitHub.com Fallback** ⚠️