Function; Player_FillProximitySobGroup - HWRM/KarosGraveyard GitHub Wiki
Player_FillProximitySobGroup(<sSobGroupNameOut>, <iPlayerIndex>, <sSobGroupName>, <fDistance>)
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
Player_FillProximitySobGroup("tempSobGroup", 0, "Patrol"..i, 5000)
if (Player_FillProximitySobGroup("tempSobGroup", 0, "EnemyCarrier", 5000) == 1) then
...code...
end
<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.
SCAR (SCripting at Relic) Reference
Updated Formatting? Initial
Updated for HWRM? Initial