Page 1 of 1

[SOLVED]Trigger A spawn

Posted: Mon Sep 14, 2020 7:31 pm
by mschoenhals
What would be the best way to trigger a spawn or enable a gameObject (enemy) using Quest Machine? I would like a spawn to be triggered when a player enters a particular area (OnTriggerEnter).

Thanks in advance.

Re: Trigger A spawn

Posted: Mon Sep 14, 2020 8:45 pm
by Tony Li
Hi,

- To spawn when the player enters a trigger collider, use a Trigger Event component. You can configure it to turn on a Spawner, or activate an inactive GameObject. Or, since I think you're also using the Dialogue System integration, you can set a Dialogue System Trigger to OnTriggerEnter. This way you can set the Dialogue System Trigger's Conditions to only fire if certain conditions are true, such as if a quest is active.

- If you want it to spawn when a quest enters a specific state, use the Activate GameObject or Instantiate Prefab Quest Action.

Re: Trigger A spawn

Posted: Tue Sep 15, 2020 8:02 am
by mschoenhals
Ok, that worked perfectly (and easier than I thought). :D
Thanks Tony!

Re: [SOLVED]Trigger A spawn

Posted: Tue Sep 15, 2020 9:10 am
by Tony Li
Glad to help!