Spawn objects with dialogue?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
birchtree1205
Posts: 1
Joined: Sun Dec 12, 2021 2:37 pm

Spawn objects with dialogue?

Post by birchtree1205 »

Hello, So how would I be able to spawn let's say a missile if the player chose a dialogue that was against the boolean condition. thx!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Spawn objects with dialogue?

Post by Tony Li »

Hi,

It depends on how you're spawning objects in general.

If it's a single, uniquely-named GameObject that's currently inactive in the scene, you can drag it into the dialogue entry's Sequence field. This will create a SetActive() sequencer command that you can use to set it active.

If you have a spawning script on a uniquely-named GameObject, and it has a method such as SpawnMissile(), you can use the SendMessage() sequencer command. For example: SendMessage(SpawnMissile,,Missile Silo)

Otherwise, you can use a custom sequencer command or a scene-based event.
Post Reply