-- damage_trigger.lua - Damages player on entry, heals on exit area -- Attach to a PSXTriggerBox in a hazard zone function onTriggerEnter() Debug.Log("Entered damage zone") setStatus("Ouch! Taking damage!") applyDamage(25) end function onTriggerExit() Debug.Log("Exited damage zone") setStatus("Escaped the danger!") end