Spawn objects with dialogue?
-
- Posts: 1
- Joined: Sun Dec 12, 2021 2:37 pm
Spawn objects with dialogue?
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?
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.
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.