SetVisibility

Category: Objects / Visibility
Since engine version: 4.9.1.0 GWE

Description

Changes the visibility of an object. Objects can be made invisible for any group of players by providing a bit mask in dwVisibility.

Syntax

bool SetVisibility (int dwVisibility, object pObj);

Parameters

dwVisibility:
Bit mask defining the new visibility.
Either VIS_All or VIS_OverlayOnly or a bit mask of VIS_None, VIS_Owner, VIS_Allies, VIS_Enemies, VIS_God, and
pObj:
[opt] Object the visibility of which is to be changed. Can be 0 in local calls.

Examples

SetVisibility(VIS_None, GetCursor())
Makes the selected clonk of player 0 completely invisible.
SetVisibility(VIS_Owner | VIS_Allies, GetCursor())
Makes the selected clonk of player 0 only visible for his owner and allies.
See also: GetVisibility, VIS_All, VIS_Allies, VIS_Enemies, VIS_God, VIS_LayerToggle, VIS_Local, VIS_None, VIS_OverlayOnly, VIS_Owner
Sven2, November 2001