function oxy_down_area_init(e) -- set distance to object before it triggers dist_to_obj_toff = 500 g_oxystate = 0 end function oxy_down_area_main(e) PlayerDist = GetPlayerDistance(e) if PlayerDist <= dist_to_obj_toff and g_PlayerHealth > 0 and g_oxygen_leak_on == 0 then -- GetEntityPlayerVisibility(e) -- Did player get near oxygen depletion? -- -- If so set variable to 1 g_oxygen_leak_on = 1 g_oxystate = 1 --if g_snd == 0 then --PlaySound(e,0) --g_snd = 1 --end end end -- function