Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Stage]
- #Title["(1) 3D stage (N)"]
- #Text["(1) 3D Stage (N)"]
- #ScriptVersion[3]
- #System["./system/SystemAlt.dnh"]
- #Background["./(1)StageBG.dnh"]
- #Player["script/player/ReimuA/playerreimu.dnh", "script/player/MarisaA/playermarisa.dnh"]
- #include "./lib_enemy.dnh"
- #include "./lib_dialogue.dnh"
- #include "./lib_sound.dnh"
- #include "./Shot Sheet/AllStarShot_Const.txt"
- #include "./lib_boss.dnh"
- let stagepart = 0;
- CreateCommonDataArea("Stage part");
- SetAreaCommonData("Stage part", "Stagepart", stagepart);
- SaveCommonDataAreaA1("Stage part");
- let bSpell = false;
- let CSD = GetCurrentScriptDirectory;
- let Global = 0;
- let text = ObjText_Create;
- let time = 0;
- ObjRender_SetY(text, 224);
- function wait(n){
- loop(n){
- yield;
- }
- }
- function rand_int(min, max){
- return round(rand(min, max))
- }
- function GetCenterX(){
- return GetStgFrameWidth() / 2;
- }
- function GetCenterY(){
- return GetStgFrameHeight() / 2;
- }
- function MyStageID{
- return GetCommonData("Main Stage Script ID", 0);
- }
- @Event {
- alternative(GetEventType())
- case(EV_PAUSE_ENTER){
- if(stagepart == 0){
- ObjSound_Stop(bgm1);
- }
- if(stagepart == 1){
- ObjSound_Stop(bgm2);
- }
- }
- case(EV_PAUSE_LEAVE){
- if(stagepart == 0){
- ObjSound_Play(bgm1);
- }
- if(stagepart == 1){
- ObjSound_Play(bgm2);
- }
- }
- case(EV_USER_STAGE){
- let arguments = GetEventArgument(0);
- let spawnType = arguments[0];
- let spawnX = arguments[1];
- let spawnY = arguments[2];
- let spawnScore = arguments[3];
- CreateItemA1(spawnType, spawnX, spawnY, spawnScore);
- }
- }
- @Initialize{
- SetCommonData("StageID", GetOwnScriptID());
- LoadCommonDataAreaA2("Value", "./CDarea.dnh");
- SetPauseScriptPath(GetCurrentScriptDirectory() ~ "./system/Pause.dnh");
- SetEndSceneScriptPath(GetCurrentScriptDirectory() ~ "./system/EndScene.dnh");
- SetCommonData("Main Stage Script ID", GetOwnScriptID());
- TStage;
- StartItemScript(GetCurrentScriptDirectory ~ "Items.dnh");
- }
- @MainLoop{
- Global ++;
- if(Global >= 60){
- Global = 0;
- time ++;
- }
- LoadCommonDataAreaA2("Boss Spell", "./CDarea.dnh");
- if(GetAreaCommonData("Boss Spell", "Active", false) == true){
- bSpell = true;
- }else{
- bSpell = false;
- }
- yield;
- }
- @Finalize{
- }
- task TStage{
- BossAppear;
- wait(120);
- DrawLoop(120, 0);
- let idScript = LoadScriptInThread(GetCurrentScriptDirectory() ~ "(1) Plural Mid (N).dnh");
- StartScript(idScript);
- while(!IsCloseScript(idScript)){
- yield;
- }
- dialogue = 0;
- SetAreaCommonData("Stage part", "Stagepart", 1);
- SaveCommonDataAreaA1("Stage part");
- SetCommonData("MC", true);
- idScript = LoadScriptInThread(GetCurrentScriptDirectory() ~ "(1) Plural Boss (N).dnh");
- stagepart = 1;
- StartScript(idScript);
- while(!IsCloseScript(idScript)){
- yield;
- }
- wait(120);
- CloseStgScene();
- }
Advertisement
Add Comment
Please, Sign In to add comment