public void SpawnGuards( ) { //get the spawn guard nodes GuardSpawnNodes.Clear(); WorldChunk chunk = worlditem.Group.GetParentChunk(); ActionNodeState nodeState = null; for (int i = 0; i < State.GuardSpawnNodeNames.Count; i++) { if (chunk.GetNode(State.GuardSpawnNodeNames [i], false, out nodeState)) { GuardSpawnNodes.Add(nodeState.actionNode); } } if (chunk.GetNode(State.AlbertSpawnNodeName, false, out nodeState)) { AlbertSpawnNode = nodeState.actionNode; } for (int i = 0; i < GuardSpawnNodes.Count; i++) { Character newGuard = null; if (Characters.SpawnCharacter(GuardSpawnNodes [i], State.GuardTemplateName, State.GuardFlags, worlditem.Group, out newGuard)) { //something something, tell them to follow SpawnedGuards.Add(newGuard); } } Characters.GetOrSpawnCharacter(AlbertSpawnNode, "Albert", worlditem.Group, out SpawnedAlbert); mHasSpawnedGuards = true; enabled = true; }