Function; SobGroup_SetInherentVisibility - HWRM/KarosGraveyard GitHub Wiki

SobGroup_SetInherentVisibility(<target_group>, <target_player>, <visibility>)

Description

Sets the 'inherent' visibility of all ships in target_group, according to the third parameter visibility, for the specified target_player.

'Inherent' refers to the group's visibility in the absence of any friendly sensors which may reveal the ship. Sensors will reveal a ship who's inherent visibility is 'none', for example.

Note: If a group's inherent visibility is set to 'secondary' or 'full', it will appear to the target player according to those vision rules even if the group is cloaked or otherwise hidden. Use VisNone to return to normal detection behavior.

Note: There is no associated getter function for this value - if you need to recall a group's assigned visibility rule, you will need to store it yourself.

Example

-- sets the inherent visibility to 'full' for ships in `"my-group"` for player 0 (the host if multiplayer, or the human if singleplayer)
-- the value 'VisFull' is globally predefined
SobGroup_SetInherentVisibility("my-group", 0, VisFull);
-- equivalent:
SobGroup_SetInherentVisibility("my-group", 0, 2);

Arguments

Param Type Description
target_group string The sobgroup who's inherent visibility will be changed for target_player.
target_player Player (number) The index of the player who will have their inherent vision of target_group changed.
visibility Visibility (number) The visibility rules to apply to the target_group for the target_player.

Returns

nil

Related Pages