107 lines
2.4 KiB
Plaintext
107 lines
2.4 KiB
Plaintext
#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();
|
|
int objBGM = ObjSound_Create();
|
|
|
|
#include "script/KevinSystem/Universal_Lib.txt"
|
|
#include "script/game/Stage_Background.dnh"
|
|
|
|
bool bossTrueStart = false;
|
|
float BGMRate = GetAreaCommonData("Config", "BGMVol", 100) * 0.01;
|
|
|
|
@Event{
|
|
|
|
alternative (GetEventType())
|
|
|
|
case(EV_PAUSE_ENTER){
|
|
if (bossTrueStart) {ObjSound_Stop(objBGM);}
|
|
}
|
|
|
|
case(EV_PAUSE_LEAVE){
|
|
if (bossTrueStart) {ObjSound_Play(objBGM);}
|
|
}
|
|
|
|
}
|
|
|
|
@Initialize{
|
|
|
|
if(!IsCommonDataAreaExists("PIV")){
|
|
CreateCommonDataArea("PIV");
|
|
SetAreaCommonData("PIV", "currentvalue", 10000);
|
|
}
|
|
else{}
|
|
|
|
SetPlayerLife(GetAreaCommonData("Config", "StartingLife", 5));
|
|
|
|
SetAutoDeleteObject(true);
|
|
|
|
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);
|
|
|
|
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");
|
|
|
|
_ScrollBackground();
|
|
|
|
// Loading and registering the boss scene
|
|
ObjEnemyBossScene_LoadInThread(obj);
|
|
ObjEnemyBossScene_Regist(obj);
|
|
|
|
bossTrueStart = true;
|
|
ObjSound_Play(objBGM);
|
|
|
|
async{
|
|
while(GetPlayerState() != STATE_END){yield;}
|
|
ObjSound_Stop(objBGM);
|
|
}
|
|
|
|
while(!Obj_IsDeleted(obj)){
|
|
yield;
|
|
}
|
|
|
|
ObjSound_Stop(objBGM);
|
|
bossTrueStart = false;
|
|
|
|
_ExplosionEffect(GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_WIDTH/2), PetalEffect);
|
|
SetAutoDeleteObject(true);
|
|
wait(120);
|
|
CloseScript(GetOwnScriptID());
|
|
} |