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.
[SOLVED]Trigger A spawn
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
[SOLVED]Trigger A spawn
Last edited by mschoenhals on Tue Sep 15, 2020 8:02 am, edited 1 time in total.
Re: Trigger A spawn
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.
- 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.
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
Re: Trigger A spawn
Ok, that worked perfectly (and easier than I thought).
Thanks Tony!
Thanks Tony!