Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.19

Description

Description:

Controls which unit types are visible on the map.

Note: In V1.40+, only works with the editor map, but not with any dialog maps (inheriting from class RscMapControl - see Discrete Map Scaling in the VBS3 Developer Reference).

Syntax (unsupported in V20.1+)

Syntax:map setFogOfWar [mode, perspective]
Parameters:
  • map: Control - Map control.
  • mode: String - Fog of War (FOW) mode. Can be:
    • "ORBAT" (Default) - All entities in the line-of-sight of the player, regardless of side. And all entities within the player Higher echelon (V19.1.0+).
    • "OFF": Shows nothing.
    • "ALL": Shows all units present.
    • "SIDE": Show all units of the specified perspective side(s).
    • "VISIBLE": Shows all units physically visible to specified perspective .
    • "VISIBLESIDE": Show all units of the specified perspective side(s), and those physically visible to them (V19.1.0+).
    • "NONE": Shows only the player. In V19.1.0+, also accounts for the new Fog of War (FOW) system.
  • perspective: Array - If defined, FOW is applied from this perspective, instead of that of the player (optional).
Return Value:Nothing

Alternative Syntax (V20.1+)

Syntax:map setFogOfWar [mode, observer, fadeDuration, iconHalfFading]
Parameters:
  • map: Control - Map control.
  • mode: String - Fog of War (FOW) mode. Can be:
    • "ORBAT" (Default) - All entities in the line-of-sight of the player, regardless of side. And all entities within the player Higher echelon (V19.1.0+).
    • "OFF": Shows nothing.
    • "ALL": Shows all units present.
    • "SIDE": Show all units of the specified observer side(s).
    • "VISIBLE": Shows all units physically visible to specified observer .
    • "VISIBLESIDE": Show all units of the specified observer side(s), and those physically visible to them (V19.1.0+).
    • "NONE": Shows only the player. In V19.1.0+, also accounts for the new Fog of War (FOW) system.
  • observer: Object - Observer entity.
  • fadeDuration: Number - Time over which no longer seen entities fade out (optional).
  • iconHalfFading: Boolean - If true, entity icons only fade to half transparency, rather than completely fading away (optional).
Return Value:Nothing

Examples

Examples:
_map setFogOfWar ["SIDE",[]];

Additional Information

See also:setDefaultFogOfWarfowIsVisiblefowIsKnownfowGetKnownEntitiesfowGetVisibleEntitiesgetFogOfWargetFogOfWarObservergetDefaultFogOfWargetDefaultFogOfWarObserver
Multiplayer:
Problems:

Notes