Zones and utility grids

The Combat plugin's gameplay zones with membership events and rules, and power or water networks of utility nodes.

Last updated Oct 26, 2026Edit this pageVersion 1.0.0

Both systems come with the Combat, Interaction & RPG plugin (off by default; enable it in the Plugins window). Engine/Plugins/Combat/Combat.mplugin

Zones

A zone is a named region of the level made of one or more box or sphere volumes. Place an AZoneActor, or add a Zone component to any entity. Volumes are axis-aligned.

FieldMeaning
zoneIdVolumes with the same id form one zone
displayName, zoneTypeTagA name for UI and a free-form type such as safe, hostile or interior
shape, halfExtents, radiusThe volume
priorityWhere volumes overlap, the highest wins, then the smaller
noCombatWeapons and melee refuse to fire or attack inside
noBuildBuilding placement is refused inside
ambienceIdSelects the music score's ambience bed; see Music and mixing
statusEffectIdA .statuseffect applied while inside and removed on leaving

Characters join zones automatically. When an entity's zone changes, the zone system fires OnZoneLeft and OnZoneEntered, and the ZoneLeft and ZoneEntered events on the entity's Visual Scripting graph.

Touching zones form a room graph: GetZoneNeighbors(zoneId) lists neighbors and FindZonePath(from, to) returns the chain of zones between two, for AI and level logic.

MZoneStatics offers GetPlayerZone, IsInZone, CountEntitiesInZone, IsPlayerCombatBlocked and GetZoneTypeTag.

Utility grids

Utility grids are power or water networks of placed nodes, for base-building and factory games. Place an AUtilityNodeActor, or add a UtilityNode component.

FieldMeaning
gridType, customGridTagPower, Water or Custom; different grids never mix
roleProducer (supplies capacity), Consumer (draws demand) or Conduit (a link)
connectionRadiusTwo nodes connect when their distance is within the larger radius
fuelItemId, fuelBurnTimeAn item a producer burns from its inventory, one unit per burn time; out of fuel means no output

Connected nodes form networks. In each network, supply is shared among consumers smallest demand first, and a consumer is powered only when its whole demand fits. Networks rebuild when nodes move, appear or disappear. The system fires OnNetworkPowered, OnNetworkUnpowered and OnNodePowerChanged, with matching Visual Scripting events on the nodes.

A crafting station with requiresPower only crafts while a powered node is nearby. See Interaction and inventory.

MUtilityStatics offers IsNodePowered, GetNetworkSupply, GetNetworkDemand and GetNetworkCount.

Engine sources

This page describes behavior implemented in these files of the engine repository, checked against commit 5922e6e5e.

  • Engine/Plugins/Combat/Combat.mplugin

Page feedback

Was this page helpful?