Mineblo helped me get the SpawnAt command working with the guard spawner (a million thanks!), and I was able to make it work with the NPC spawner and the wildlife spawner as well.
however …
I haven’t been able to get it to work with the creature spawner. No matter what I try, I get no errors in my code. The creature DOES spawn, which is weird, but not at the location I choose and the code ceases to run from that point forward. I have tried changing the settings in the creature spawner, but either I’m not hitting upon the right combination, there is something different I need to add to the code for the creature spawner, or maybe its broken.
Any help would be greatly appreciated! ![]()
Here is the code I’m trying to get working:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/SpatialMath }
kaos_playground_device := class(creative_device):
@editable CreatureSpawner : creature_spawner_device = creature_spawner_device{}
@editable GuardSpawner : guard_spawner_device = guard_spawner_device{}
@editable NPCSpawner : npc_spawner_device = npc_spawner_device{}
@editable WildlifeSpawner : wildlife_spawner_device = wildlife_spawner_device{}
OnBegin<override>()<suspends>:void=
GuardSpawner.Despawn()
Sleep(1.0)
CreatureSpawner.EliminateCreatures()
NewPosition1 : vector3 = vector3{Left := -22.0, Up := 1284.0, Forward := -5764.0}
NewPosition2 : vector3 = vector3{Left := -590.0, Up := 1179.0, Forward := 1810.0}
SpawnedAgent1 := GuardSpawner.SpawnAt(NewPosition1)
if(SpawnedAgent1 = false):
Print("Guard not spawned!")
else:
Print("Guard spawned!")
SpawnedAgent2 := NPCSpawner.SpawnAt(NewPosition1)
if(SpawnedAgent2 = false):
Print("NPC not spawned!")
else:
Print("NPC spawned!")
SpawnedAgent3 := WildlifeSpawner.SpawnAt(NewPosition1)
if(SpawnedAgent3 = false):
Print("Wildlife not spawned!")
else:
Print("Wildlife spawned!")
SpawnedAgent4 := CreatureSpawner.SpawnAt(NewPosition1)
Print("This line was processed")
if(SpawnedAgent4 = false):
Print("Creature not spawned!")
else:
Print("Creature spawned!")