set_zone_state - ryzom/ryzomcore GitHub Wiki


title: Set Zone State description: published: true date: 2023-03-13T01:49:25.827Z tags: editor: markdown dateCreated: 2023-03-13T01:47:23.368Z

setZoneState

The setZoneState native AI script function is used to set the active state flag of a zone.

Syntax

()setZoneState(zoneName: s, zoneState: f) // setZoneState_sf_

Arguments

  • zoneName (string): The name ID of the zone to set the state.
  • zoneState (float): The value of the state to set. The interpretation of this value depends on whether the zone is a PvP or non-PvP zone.
    • For non-PvP zones, the value is interpreted as a boolean (0 for inactive and 1 for active).
    • For PvP zones, the value is interpreted as:
      • 0: Inactive
      • 1: Active with faction point rewards
      • 2: Active without faction point rewards

Example

()setZoneState("toto", 1.0);

This example code sets the state of the zone named "toto" to active.

⚠️ **GitHub.com Fallback** ⚠️