2022-08-22 10:14:18 +00:00
|
|
|
#TouhouDanmakufu[Plural]
|
|
|
|
#ScriptVersion[3]
|
|
|
|
#Title["Boss Plural"]
|
|
|
|
#Text["..."]
|
|
|
|
#System["script/KevinSystem/Kevin_System.txt"]
|
|
|
|
//#Player["script/KevinPackage/KevinScript_Players/PankevKouda/KevKou_Main.dnh", "script/KevinPackage/KevinScript_Players/MariHousui/MariHousui_Main.dnh"]
|
|
|
|
|
|
|
|
let csd = GetCurrentScriptDirectory();
|
|
|
|
|
|
|
|
let obj = ObjEnemyBossScene_Create();
|
2022-08-22 15:05:46 +00:00
|
|
|
int objBGM = ObjSound_Create();
|
2022-08-22 10:14:18 +00:00
|
|
|
|
|
|
|
#include "script/KevinSystem/Universal_Lib.txt"
|
|
|
|
#include "script/game/Stage_Background.dnh"
|
|
|
|
|
2022-08-22 15:05:46 +00:00
|
|
|
bool bossTrueStart = false;
|
|
|
|
float BGMRate = GetAreaCommonData("Config", "BGMVol", 100) * 0.01;
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
@Event{
|
|
|
|
|
2022-08-22 15:05:46 +00:00
|
|
|
alternative (GetEventType())
|
|
|
|
|
|
|
|
case(EV_PAUSE_ENTER){
|
|
|
|
if (bossTrueStart) {ObjSound_Stop(objBGM);}
|
|
|
|
}
|
|
|
|
|
|
|
|
case(EV_PAUSE_LEAVE){
|
|
|
|
if (bossTrueStart) {ObjSound_Play(objBGM);}
|
|
|
|
}
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Initialize{
|
|
|
|
|
|
|
|
if(!IsCommonDataAreaExists("PIV")){
|
|
|
|
CreateCommonDataArea("PIV");
|
|
|
|
SetAreaCommonData("PIV", "currentvalue", 10000);
|
|
|
|
}
|
|
|
|
else{}
|
|
|
|
|
|
|
|
SetAutoDeleteObject(true);
|
2022-08-22 15:05:46 +00:00
|
|
|
|
|
|
|
ObjSound_Load(objBGM, "script/game/resourceLib/bossTheme.ogg");
|
|
|
|
ObjSound_SetSoundDivision(objBGM, SOUND_BGM);
|
|
|
|
ObjSound_SetResumeEnable(objBGM, true);
|
|
|
|
ObjSound_SetLoopEnable(objBGM, true);
|
|
|
|
ObjSound_SetLoopTime(objBGM, 0.00, 89.618);
|
|
|
|
|
|
|
|
ObjSound_SetVolumeRate(objBGM, 99*BGMRate);
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
PluralTask();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@MainLoop{
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Finalize
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* TO DO:
|
|
|
|
|
|
|
|
+ Single *syncing* - ensure that the boss stays at the same position
|
|
|
|
*/
|
|
|
|
// Task to handle the plural's boss scene
|
|
|
|
|
|
|
|
task PluralTask(){
|
|
|
|
// Registering individual singles
|
|
|
|
|
|
|
|
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non1.dnh");
|
|
|
|
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell1.dnh");
|
|
|
|
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non2.dnh");
|
|
|
|
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell2.dnh");
|
|
|
|
ObjEnemyBossScene_Add(obj, 0, csd ~ "Non3.dnh");
|
|
|
|
ObjEnemyBossScene_Add(obj, 0, csd ~ "Spell3.dnh");
|
|
|
|
|
2022-08-22 15:05:46 +00:00
|
|
|
_ScrollBackground();
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
// Loading and registering the boss scene
|
|
|
|
ObjEnemyBossScene_LoadInThread(obj);
|
|
|
|
ObjEnemyBossScene_Regist(obj);
|
|
|
|
|
2022-08-22 15:05:46 +00:00
|
|
|
bossTrueStart = true;
|
|
|
|
ObjSound_Play(objBGM);
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
while(!Obj_IsDeleted(obj)){
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
2022-08-22 15:05:46 +00:00
|
|
|
ObjSound_Stop(objBGM);
|
|
|
|
bossTrueStart = false;
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
_ExplosionEffect(GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_WIDTH/2), PetalEffect);
|
|
|
|
SetAutoDeleteObject(true);
|
|
|
|
wait(120);
|
|
|
|
CloseScript(GetOwnScriptID());
|
|
|
|
}
|