-- LUA Script - precede every function and global member with lowercase name of script + '_main' -- Player Collects Health function collect_flint_init(e) end function collect_flint_main(e) PlayerDist = GetPlayerDistance(e) if PlayerDist < 100 and g_PlayerHealth > 0 then Prompt("Press E to pick this up.") if g_KeyPressE == 1 then PlaySound(e,0) g_flintcollected = g_flintcollected + 1 Destroy(e) ActivateIfUsed(e) end end end