NPC to Observe other factions in area?

Is it possible to have NPC1 be aware of NPC2 & NPC3’s faction in a area?

Trying to plan out a system here for an arena where NPC1 triggers the spawning via conversation. Two factions will spawn RED and BLUE. I would like NPC1 to pause briefly (10seconds) after triggering the spawn script from convo, in case there is a delay in spawning, and then to know that both factions exist in the area. When one faction remains, NPC announces “Faction 1…” or “Faction 2 wins!”… Waits 10 seconds and then removes the remaining red or blue factions from the area.

Also something I’ve never done before. Could NPC1’s conversation be prevented after running a spawning script, but then enabled again after he cleares the remaining red or blue faction creatures?

Sorry this is heavy handed request. Just trying to line up what I need to do , and see if I’m going down a ill-advised path.

It can be done, but an event-driven approach is easier.

In both RED and BLUE spawn events, assign an ActionDoCommand to them that tells NPC1 they exist. That will only happen when spawning is complete.

In their OnDeath event, AssignCommand to NPC1 to announce the winner.

Conversation can be prevented by having no conditional branches that are true (toggled by those events).

You might want to work up to this by doing some scripting and conversation tutorials, trying it out on simpler cases, or elements of this case.

1 Like

Perfect. Thank you!