Summary
As of version 36.00, even if the NPC Spawner Device is implemented to only spawn NPCs via the Spawn() function, using Enable() will result in an extra NPC being spawned.
In this situation, it becomes difficult to utilize the “Despawn AIs When Disabled” setting effectively when trying to spawn a fixed number of NPCs using the NPC Spawner Device.
Please select what you are reporting on:
Creative
What Type of Bug are you experiencing?
Assets
Steps to Reproduce
- Place both an NPC Spawner Device and an Input Trigger Device.
- Change the parameters of the NPC Spawner Device according to the details attached in the thread (so that spawning only occurs via the Spawn() function).
- Link the Enable and Spawn Direct Event Bindings of the NPC Spawner Device to the Pressed event of the Input Trigger Device.
- Start the session.
Expected Result
Only the enabling should be handled by the Enable() function. NPC spawning should occur only via the Spawn event.
Observed Result
Calling both Spawn() and Enable() results in one NPC being spawned by each call.
In other words, two NPCs are spawned.
Platform(s)
Windows 11
Upload an image
Additional Notes
In the thread, I described how to reproduce the issue using devices, but the same behavior also occurs in Verse.