let MainSTG = GetMainStgScriptDirectory;

task PlayDelaySE(se,delay){
        loop(delay){yield;}
        PlaySE(se);
}

let se;

task PlaySound(str,v,w){
	let s = ObjSound_Create;
	if(str == "Shot1"){ObjSound_Load(s,MainSTG~"sound/Shot1.wav");}
	if(str == "Shot2"){ObjSound_Load(s,MainSTG~"sound/Shot2.wav");}
	if(str == "Shot3"){ObjSound_Load(s,MainSTG~"sound/Shot3.wav");}
	if(str == "Shot4"){ObjSound_Load(s,MainSTG~"sound/Shot4.wav");}
	if(str == "Shot5"){ObjSound_Load(s,MainSTG~"sound/Shot5.wav");}
	if(str == "Shot6"){ObjSound_Load(s,MainSTG~"sound/Shot6.wav");}
	if(str == "Laser1"){ObjSound_Load(s,MainSTG~"sound/Laser1.wav");}
	if(str == "Laser2"){ObjSound_Load(s,MainSTG~"sound/Laser2.wav");}
	if(str == "Laser3"){ObjSound_Load(s,MainSTG~"sound/Laser3.wav");}
	if(str == "Laser4"){ObjSound_Load(s,MainSTG~"sound/Laser4.wav");}
	if(str == "Laser5"){ObjSound_Load(s,MainSTG~"sound/Laser5.wav");}
	if(str == "Laser6"){ObjSound_Load(s,MainSTG~"sound/Laser6.wav");}
	if(str == "Charge1"){ObjSound_Load(s,MainSTG~"sound/Charge1.wav");}
	if(str == "Charge2"){ObjSound_Load(s,MainSTG~"sound/Charge2.wav");}
	if(str == "Charge3"){ObjSound_Load(s,MainSTG~"sound/Charge3.wav");}
	if(str == "Charge4"){ObjSound_Load(s,MainSTG~"sound/Charge4.wav");}
	if(str == "Weird1"){ObjSound_Load(s,MainSTG~"sound/Weird1.wav");}
	if(str == "Weird2"){ObjSound_Load(s,MainSTG~"sound/Weird2.wav");}
	if(str == "Weird3"){ObjSound_Load(s,MainSTG~"sound/Weird3.wav");}
	if(str == "BulletWave"){ObjSound_Load(s,MainSTG~"sound/BulletWave.wav");}
	if(str == "bright"){ObjSound_Load(s,MainSTG~"sound/bright.wav");}
	if(str == "Eff1"){ObjSound_Load(s,MainSTG~"sound/Eff1.wav");}
	if(str == "Eff2"){ObjSound_Load(s,MainSTG~"sound/Eff2.wav");}
	if(str == "Eff3"){ObjSound_Load(s,MainSTG~"sound/Eff3.wav");}
	if(str == "Eff4"){ObjSound_Load(s,MainSTG~"sound/Eff4.wav");}
	if(str == "fam"){ObjSound_Load(s,MainSTG~"sound/fam.wav");}
	if(str == "stars"){ObjSound_Load(s,MainSTG~"sound/stars.wav");}
	if(str == "Enep1"){ObjSound_Load(s,MainSTG~"sound/Enep1.wav");}
	if(str == "Hidden"){ObjSound_Load(s,MainSTG~"sound/Sudden.wav");}
	if(str == "famdie"){ObjSound_Load(s,MainSTG~"sound/famdie.wav");}
	if(str == "nonfinish"){ObjSound_Load(s,MainSTG~"sound/nonfinish.wav");}
	if(str == "cardcall"){ObjSound_Load(s,MainSTG~"sound/cardcall.wav");}
	if(str == "piss"){ObjSound_Load(s,MainSTG~"sound/piss.wav");}
	if(str == "Heal"){ObjSound_Load(s,MainSTG~"sound/Heal.wav");}
	if(str == "enemoff"){ObjSound_Load(s,MainSTG~"sound/enemoff.wav");}
	loop(w){yield;}
	ObjSound_SetSoundDivision(s,SOUND_SE);
	ObjSound_SetVolumeRate(s,v);
	ObjSound_Play(s);

}