Postby deice » Wed Dec 29, 2021 6:12 am
if i'm understanding you correctly, you're trying to only make a specific instance of said npc die after a certain amount of frames elapse.
if you're not well-acquainted with custom npcs, i recommend looking at "npc-n.lua" in "data/_templates".
to accomplish what you've described, simply declare a local timer variable equal to the amount of frames, decrement it in onTickNPC() and call kill() when it reaches 0.