// QuestArea.cs // Put this on a trigger (an object with a collider set to Is Trigger). A player walking in completes a quest task that is // "Done by a script" - or, with Task left empty, is offered the quest. // (Tasks of the kind "Walk into areas" need no script at all: pick the areas in the Quests window.) using IHXR.Simulation; public class QuestArea : ScriptBase { [Tooltip("The quest's title (or id).")] public string Quest = ""; [Tooltip("The task's title (or id). Empty: offer the quest instead.")] public string Task = ""; public override void Start() { RegisterTrigger(OnEnter); } private void OnEnter(TriggerInfo info) { if (!info.IsPlayer) return; if (Task.Length == 0) OfferQuest(info.Username, Quest); else CompleteQuestTask(info.Username, Quest, Task); } }