Skip to content

FogOfWar

Hides what the Commander’s team can’t see. Where its units and buildings have never been is black; where they’ve been but can’t see now is dimmed, with enemy units in it hidden. Goes on the camera with the Commander.

Part of the Strategy module: Real-time strategy: factions, units that walk around obstacles and fight, workers that gather and build, buildings that train units, fog of war, the computer playing a side, the player’s controls and HUD, playing online team against team, and the Strategy template.

Requires: Commander

In a network game, each machine keeps its own entity with this on it: it isn’t sent.

Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.

  • cellSize: a number = 0.5. The size of a square of fog, in world units. Smaller is smoother but slower. (Field: a number.)
  • unexplored: a color, “#RRGGBB” or “#RRGGBBAA” = “#080A0EFF”. The color of ground never seen. (Field: a color.)
  • explored: a color, “#RRGGBB” or “#RRGGBBAA” = “#080A0F8C”. The color laid over ground seen before but not now. (Field: a color.)

Scripts use it as FogOfWar: its methods, events and values that aren’t saved with the scene.