Hi, I'm working on a small quest script that resets variables when everyone in the quest room has died.
I'm storing the players in a table, so I wanted a way to check if the players are still alive by calling a function when a player dies
I've tried registering a new OnDeath event in the script
But it doesnt seem to be called when a player dies? Is there a tried and true method to do this? I've been looking for documentation but its not very clear
I'm storing the players in a table, so I wanted a way to check if the players are still alive by calling a function when a player dies
I've tried registering a new OnDeath event in the script
LUA:
local creatureEvent = CreatureEvent("DungeonPlayerDeath")
function creatureEvent.onDeath(creature)
print("player died")
end
creatureEvent:register()
But it doesnt seem to be called when a player dies? Is there a tried and true method to do this? I've been looking for documentation but its not very clear