VIS constant group

Description

Constants for setting or retrieving the visibility of an object. These constants are used with GetVisibility and SetVisibility.

Constants

Name Category Description Introduced in Value
VIS_All Objects/Visibility The object is visible for all. Therefore, logically, this value cannot be combined with other VIS constants. 4.9.1.0 GWE 0
VIS_None Objects/Visibility The object is not visible to anyone. 4.9.1.0 GWE 1
VIS_Owner Objects/Visibility The object is visible to the owner. 4.9.1.0 GWE 2
VIS_Allies Objects/Visibility The object is visible to all allies of the owner. 4.9.1.0 GWE 4
VIS_Enemies Objects/Visibility The object is visible to all enemies of the owner. 4.9.1.0 GWE 8
VIS_Local Objects/Visibility The object's visibility depends on the values in the object's indexed local variables. Each local variable may contain bits for 32 players in a bit mask. 4.9.1.0 GWE 16
VIS_God Objects/Visibility The object is visible only in the general viewport (viewport in developer mode or game area in the network without players (observation mode)). 4.9.1.0 GWE 32
VIS_LayerToggle Objects/Visibility The visibility depends on the visibility of the layer object: If the layer object has VIS_LayerToggle visibility the object will be invisible if the layer object is visible. If, on the other hand, the layer object is invisible the object's visibility is unchanged. 4.9.7.0 CR 64
VIS_OverlayOnly Objects/Visibility The object is only visible when used as overlay on other objects using SetGraphics. Can't be combined with other VIS constants. 4.9.7.0 CR 128

Examples

var obj;
while (obj=FindObject(WIPF,0,0,0,0,0,0,0,0,obj))
	SetVisibility(VIS_None, obj);
				
Makes all Wipfs invisible.
Local(0)=9; SetVisibility(VIS_Local);
The calling object is only visible for players 0 and 3
Local(1)=2; SetVisibility(VIS_Local | VIS_God);
The calling object is only visible for player 33
Local(GetOwner()/32)=1<<(GetOwner()%32);
SetVisibility(VIS_Local);
				
The calling object is only visible to its owner (corresponds to VIS_Owner)

Changelog

Date Author Version Affecting Description
November 2001 Sven2 4.9.1.0 GWE All Introduction VIS constant group.
July 2016 Fulgen 4.9.7.0 CR VIS_LayerToggle and VIS_OverlayOnly Added constants from the Clonk wiki.
Sven2, November 2001
Fulgen, July 2016