
void main()
{
    // Check if the trigger has already activated the spawners
    if (GetLocalInt(OBJECT_SELF, "bHasActivated") == TRUE)
    {
        // If already activated, do nothing
        return;
    }

    // Set the activation flag to prevent re-triggering
    SetLocalInt(OBJECT_SELF, "bHasActivated", TRUE);

    // Get the first placeable with the tag "CAS_ARMYSPAWNER" in the area
    object oSpawner = GetObjectByTag("CAS_ARMYSPAWNER");

    // Loop through all objects with the "CAS_ARMYSPAWNER" tag
    while (GetIsObjectValid(oSpawner))
    {
        // Call the TurnOnSpawner function for each valid spawner
        TurnOnSpawner(oSpawner);

        // Get the next placeable with the same tag
        oSpawner = GetObjectByTag("CAS_ARMYSPAWNER", oSpawner);
    }

    // Optionally, display a message to the player confirming all spawners were activated
    SendMessageToPC(GetFirstPC(), "All army spawners have been activated.");
}
