Summary
When using the Spawned event on the NPC spawner, there is a small delay between the NPC character spawning and the event firing.
This creates issues where high level players eliminate NPCs as they’re spawning and the event doesn’t have time to fire. For Roguelikes for example, this forces us to create workarounds to make sure the kill and rewards are actually granted to the player and isn’t lost.
Another issue is requiring to kill all NPCs in a level in order to progress. If you have a barrier or door that can only be opened after killing all NPCs relying on the Spawned event will result in the barrier/door not opening unless you account for possible lost spawned events (which requires creating systems that add more stress to the server)
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
- Create a basic Roguelike system that grants a reward to the player when eliminating NPCs and has a barrier or door that is only opened when eliminating all NPCs.
- Grab a very powerful weapon and gain more damage with a damage amplifier (the Ascended Myst is a very good option)
- Trigger the NPCs so they spawn
- Immediately kill them
Expected Result
All systems relying on Spawned event should work without issues. The event should fire as the NPC starts spawning, NOT after it finishes spawning.
Observed Result
If you kill the NPCs before they visibly fully spawn the Spawned event doesn’t fire.
Platform(s)
All
Additional Notes
This issue starts showing up when players are strong enough and very high level and they deal a lot of damage per hit. The ascended myst item and explosives are good to replicate it.
Some roguelikes spawn the NPCs in room 2 as soon as you kill the NPCs in room 1, but if your roguelike requires players to enter a room to spawn the NPCs (like for example in my roguelike, which is a TWDU roguelike where the enemies can’t use weapons) then players are highly likely to encounter this issue.