GraemeBB is right.
Calling Enable() will either:
- Start the timer to spawn if the device is set to “Spawn on Timer = true” or
- It will try to spawn one if the device is set to “Spawn on Timer = false”
It doesn’t seem we have changed this behavior lately.
Thus, as pasted in the screenshot above, if you do:
SpawnDevice.Enable() # A request to spawn an NPC will be queued (IT IS NOT SYNCHRONOUS)
SpawnDevice.DespawnAll(false) # As there is no NPC yet to despawn, this line does nothing
SpawnDevice.Reset() # This reset the number of NPC spawned to 0
spawn{SpawningFunction()} # This will request another NPC to spawn
I would suggest to either start with the device enabled then call Spawn() or call Enable() instead of Spawn() in your SpawningFunction()
On our side, we will investigate if we should cancel pending spawn requests when DespawnAll is called.
Thanks and have an Epic day!