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"]
- let stagepart;
- let bgm;
- let bgm2;
- @Initialize{
- TStage();//main task of the script
- }
- @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);
- }
- }
- }
- 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();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement