I'm having 2 issues with the spawner script:
1)I'm trying to setup a bunch of quest givers with the same quest to be placed randomly on a procedurally created terrain. For example, go to X object and come back. X object should spawn only for the guest giver I trigger. The good news is the object does spawn. However, I'm noticing that if I go to 1 of the guest givers the spawn item is duplicated for all quest givers in the world. Is it possible to have multiple quest givers have the same quest assigned to them and understand that when they are triggered to spawn something it would be unique to them?
2)The spawner script doesn't spawn the enemies or objects to adjust to a 3D terrain that has height. It seems to set and place whatever is spawned at the height the spawner object is set at.
Thanks!
Spawner and Procedural Generation
Re: Spawner and Procedural Generation
Hi,
Alternatively, you could add a script to your spawnable object that does a raycast down from the sky and places the object where it intersects the ground.
You'll need to assign different quests that use different spawners, or write a subclass of Spawner or your own spawning code to handle it differently.parnell wrote: ↑Wed Mar 02, 2022 9:02 pm1)I'm trying to setup a bunch of quest givers with the same quest to be placed randomly on a procedurally created terrain. For example, go to X object and come back. X object should spawn only for the guest giver I trigger. The good news is the object does spawn. However, I'm noticing that if I go to 1 of the guest givers the spawn item is duplicated for all quest givers in the world. Is it possible to have multiple quest givers have the same quest assigned to them and understand that when they are triggered to spawn something it would be unique to them?
You can also set spawnpoints for the spawner instead of a radius from the spawner object. If you're procedurally generating terrain, you'll need to update those spawnpoints after generating the terrain.
Alternatively, you could add a script to your spawnable object that does a raycast down from the sky and places the object where it intersects the ground.