 #TouhouDanmakufu[Plural]
 #Title["Pratice Plural Scirpt"]
 #Text["um[r]ok"]
 #ScriptVersion[3]

let d = GetCurrentScriptDirectory;

 @Initialize{
     TPlural;
     SetPlayerLife(10); 
     /*ph3 does not have continues by default. 
       You must make your own continue system or give a large number of lives if your script is difficult.*/
 }
 
 @MainLoop{
     yield;
 }

  function musiclol(path){
     let obj = ObjSound_Create;
     ObjSound_Load(obj,path);
     ObjSound_SetSoundDivision(obj, SOUND_BGM);
     ObjSound_Play(obj);
     ObjSound_SetVolumeRate(obj,95);
     return obj;
 }


 task TPlural{
     let obj=ObjEnemyBossScene_Create(); //Plurals are made from Boss Scene objects
     musiclol(d~"D.mp3");
     ObjEnemyBossScene_Add(obj,0,d~"Non-Spell 1.txt");
     ObjEnemyBossScene_Add(obj,0,d~"Spell 1.txt");
     ObjEnemyBossScene_Add(obj,1,d~"Non-Spell 2.txt");
     ObjEnemyBossScene_Add(obj,1,d~"Spell 2.txt");
     ObjEnemyBossScene_Add(obj,2,d~"Non-Spell 3.txt");
     ObjEnemyBossScene_Add(obj,2,d~"Spell 3.txt");
     ObjEnemyBossScene_Add(obj,3,d~"Non-Spell 4.txt");
     ObjEnemyBossScene_Add(obj,3,d~"Spell 4.txt");
     ObjEnemyBossScene_LoadInThread(obj); //You must load the plural inside the thread/process
     ObjEnemyBossScene_Regist(obj); //You must register the Boss Scene object
     while(!Obj_IsDeleted(obj)){ //Until the plural has been cleared, the TPlural yields.
         yield;
     }   
     CloseScript(GetOwnScriptID()); //Close the plural.
 }