Page 1 of 1

Spawn objects with dialogue?

Posted: Sun Dec 12, 2021 2:53 pm
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!

Re: Spawn objects with dialogue?

Posted: Sun Dec 12, 2021 3:53 pm
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.