MOH Central

Medal of Honor Series Forum => MOHAA Series: General => Topic started by: Gotcha {sfx} on June 08, 2015, 10:54:54 PM

Title: Breathing when health under 50
Post by: Gotcha {sfx} on June 08, 2015, 10:54:54 PM
This isn't a complete work, it needs a little refurb, script works fine but i couldn't get the breathing to stop on death, so when people don't respawn you hear them breathing where ever they died. other than that, neat. its currently setup in Southern France

local.master aliascache gasmask3 sound/characters/gasmask3.wav soundparms 0.1 0.1 0.1 0.1 0.5 1 body streamed maps "m dm obj train "
//make this sound quieter so its not so loud everyone hears it

level waittill spawn
setcvar "sv_runspeed" "400"
setcvar "sv_gravity" "500"
setcvar "dmflags" "8"

//---------start------
thread breathe


breathe:
local.origin = ( 219 -389 16 ) //random middle of map area mohdm1

local.trig = spawn trigger_multiple
local.trig.origin =  local.origin
local.trig setsize ( -10000 -10000 -10000 ) ( 10000 10000 10000 )
local.trig setthread hit
local.trig delay 0

end

//-------------im hit-------------------------
//this works perfect, volumes might have to be tweaked, not sure if this'll be too loud for enemies around you or your team being //next to you. cannot get sound to stop on death, but i got over it because it doesnt continue on respawn

hit:
local.player = parm.other
if(local.player.health <= 50) //when hes <= with 50 health he starts breathing
local.player loopsound gasmask3 //<-- gasmask sound
if(local.player.health > 50) //stop sound when health is above 50
local.player stoploopsound

end
Title: Re: Breathing when health under 50
Post by: Goober {sfx} on June 11, 2015, 12:55:28 PM
Nice; that's something different.  :)