wait_in_zone - ryzom/ryzomcore GitHub Wiki


title: Wait in Zone description: Make a group wander in a specified zone published: true date: 2026-03-14T00:00:00.000Z tags: editor: markdown dateCreated: 2023-03-16T22:31:23.864Z

waitInZone

The waitInZone native AI script function makes the group wander in the specified zone. This is useful to prevent the group from looping a previous movement profile.

Syntax

()waitInZone(zone: s)

Arguments

  • zone (string): The full alias name of an npc_zone primitive node defined in World Editor.

Zone Names

Zone names are the full alias names of npc_zone nodes from the World Editor primitive tree. These are the same zones that serve as behavioral states for NPC groups. The full name typically follows the primitive hierarchy, e.g. continent:manager:zone_name.

In practice, you should not hardcode zone names. Instead, obtain them dynamically from the zone lookup functions:

These functions return zone name strings that can be passed directly to waitInZone.

Example

// Find a zone with "rest" flag and wander there
($zone)getZoneWithFlags("food", "start", "");
if ($zone != "")
{
    ()waitInZone($zone);
}

See also

Source: ryzom/server/src/ai_service/nf_grp_npc.cpp (waitInZone_s_)

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