Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #東方弾幕風[Stage]
- #ScriptVersion[3]
- #Title["The Koimeiji Sisters"]
- #Text["I'm going to blow your mind!"]
- #Background["./BG.txt"]
- #Player["./player/Reimu by plasmaflame22/Reimu_A.txt", "./player/Reimu by plasmaflame22/Reimu_B.txt", "./player/Reimu by plasmaflame22/Reimu_C.txt", "./player/Reimu(Mr. Blue)/Reimu.txt", "./player/Ultima's DDC Reimu B/ReimuH.dnh", "./player/gt_medicine/PracticeP.txt"]
- let stagepart = 0;
- let bgm;
- let bgm2;
- @Initialize{
- TStage();//main task of the script
- SetPlayerLife(10);
- SetPlayerSpell(5);
- }
- @Event {
- alternative(GetEventType())
- case(EV_PAUSE_ENTER){
- if(stagepart == 0){
- ObjSound_Stop(bgm);
- }
- if(stagepart == 1){
- ObjSound_Stop(bgm2);
- }
- }
- case(EV_PAUSE_LEAVE){
- if(stagepart == 0){
- ObjSound_Play(bgm);
- }
- if(stagepart == 1){
- ObjSound_Play(bgm2);
- }
- }
- }
- @MainLoop{
- yield;
- }
- @Finalize{
- }
- task TStage{
- let dir = GetCurrentScriptDirectory();
- let pathmidboss = dir ~ "Mr. Hat.txt";
- let pathboss = dir ~ "Mr. Eye.txt"; //define a path for the plural
- let midbossScript = LoadScriptInThread(pathmidboss);
- let bossScript = LoadScriptInThread(pathboss);//loading it
- bgm2 = ObjSound_Create();
- ObjSound_Load(bgm2, dir ~ "./bgm/SHITORI.ogg");
- StageBGM(bgm2, 2);
- bgm = ObjSound_Create();
- ObjSound_Load(bgm, dir ~ "./bgm/KOISHIT.ogg");
- StageBGM(bgm, 1);
- ObjSound_Play(bgm);
- loop(60){yield;}//waits for the loading
- //Midboss
- StartScript(midbossScript);
- while(!IsCloseScript(midbossScript) && GetPlayerState() != STATE_END){
- yield;
- }
- loop(120){yield;}
- //Boss
- stagepart = 1;
- ObjSound_Stop(bgm);
- ObjSound_Play(bgm2);
- StartScript(bossScript);
- while(!IsCloseScript(bossScript) && GetPlayerState() != STATE_END){
- yield;
- }
- //Once either ceases to be true, the stage waits a bit and then closes
- loop(240){yield;}
- //which closes the stage formally
- CloseStgScene();
- }
- function SoundBGM(path){
- let obj = ObjSound_Create();
- ObjSound_Load(obj, path);
- ObjSound_SetSoundDivision(obj, SOUND_BGM);
- ObjSound_SetVolumeRate(obj, 100);
- return obj;
- }
- function StageBGM(obj, ID){
- ObjSound_SetSoundDivision(obj, SOUND_BGM);
- ObjSound_SetRestartEnable(obj, true);
- ObjSound_SetLoopEnable(obj, true);
- ObjSound_SetLoopTime(obj, 0, 300);
- if(ID == 1){ObjSound_SetLoopTime(obj, 2, 120);}
- if(ID == 2){ObjSound_SetLoopTime(obj, 0, 240);}
- return obj;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement