let dirCurrent = GetCurrentScriptDirectory();
let bgm = ObjSound_Create();
let bgm2 = ObjSound_Create();

function wait(w){
       loop(w) {
	     yield;
		 }
	}

task playSTG1 {

ObjSound_Load(bgm, GetCurrentScriptDirectory() ~ "STG1.WAV");
ObjSound_SetRestartEnable(bgm, true);
    ObjSound_Play(bgm); 
	
	wait(2800);
     ObjSound_Stop(bgm);
	 
	 RemoveSound(bgm);
	 
	 
	 yield;
	 }
	 
task playSTGDELETE {

ObjSound_Load(bgm, GetCurrentScriptDirectory() ~ "STG1.WAV");

     ObjSound_Stop(bgm);
	 
	 RemoveSound(bgm);
	 
	 
	 yield;
	 }
	 	 
	 
task playBOSS1 {

ObjSound_Stop(bgm);
	 
	 RemoveSound(bgm);

ObjSound_Load(bgm2, GetCurrentScriptDirectory() ~ "BOSS1.WAV");
wait(50);
   
	ObjSound_SetLoopEnable(bgm2, true);
	ObjSound_SetLoopTime(bgm2, 0, 116);
	ObjSound_SetRestartEnable(bgm2, true);
    ObjSound_Play(bgm2); 
	 
	 yield;
	 }	 
	 
task playBOSSDELETE {

ObjSound_Load(bgm2, GetCurrentScriptDirectory() ~ "BOSS1.WAV");
wait(200);
   
	ObjSound_Stop(bgm2);
	RemoveSound(bgm2);
	 
	 yield;
	 }	 	 