Guest User

111

a guest
Jul 20th, 2013
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.39 KB | None | 0 0
  1.  
  2.  
  3.     #TouhouDanmakufu[Stage]
  4.     #Title[Stage for Koishi]
  5.     #Text[]
  6.     #Image[]
  7.     #Background[]
  8.     #BGM[]
  9.     #Player[FREE]
  10.     #ScriptVersion[2]
  11.  
  12.     script_stage_main{
  13.      let imagefile = GetCurrentScriptDirectory ~ "Palace.png";
  14.      
  15.      function WaitForNoEvent { while(OnEvent) { yield; } }
  16.      function Wait(let frames){
  17.        loop(frames){yield;}
  18.      }
  19.      function WaitForZeroEnemy{
  20.       while(GetEnemyNum != 0){yield;}
  21.      }
  22.      task stage{
  23.       Wait(120);
  24.       CreateEventFromScript("name");
  25.       WaitForNoEvent;
  26.       CreateEnemyBossFromFile(GetCurrentScriptDirectory~"Koishi's fun time.txt", 0, 0, 0, 0, 0);
  27.       WaitForZeroEnemy;
  28.       Wait(60);
  29.       Clear;
  30.      }
  31.      
  32.       @Initialize{
  33. LoadGraphic(imagefile);
  34.      stage;
  35.       }
  36.      @MainLoop{
  37.        yield;
  38.       }
  39.       @BackGround{
  40.      
  41.  
  42.       // Draw a simple text message
  43.       // Arguments: outputted text , X , Y , text size , alpha value
  44.       // - Text size is the height of the text
  45.       // - Alpha will be covered in the next section
  46.       DrawText("Koishi Komeji", 50, 50, 12, 255);
  47.  
  48.       // Set our image file to be active texture
  49.       SetTexture(imagefile);
  50.  
  51.       // Set the area of the image file we want to use (in this case, the entire 128x128 file)
  52.       // Arguments: left-side x , top-side y , right-side x , bottom-side y
  53.       SetGraphicRect(0, 0, 256, 256);
  54.  
  55.       // Draw the graphic onto the screen
  56.       SetGraphicScale ( 1.5, 1.7);
  57.       DrawGraphic(GetCenterX(), GetCenterY());
  58.  
  59.  
  60.       }
  61.       @Finalize{
  62.      
  63.       }
  64.      
  65.     }
  66.     script_event name{
  67.      let Reimu1 = GetCurrentScriptDirectory ~ "Reimu Pic1.png";
  68.      let Koishi1 = GetCurrentScriptDirectory ~ "Koishi Pic1.png;";
  69.      let Reimu2 = GetCurrentScriptDirectory ~ "Reimu Pic2.png";
  70.      let Koishi2 = GetCurrentScriptDirectory ~ "Koishi Pic2.png;";
  71.      
  72.     @Initialize{
  73.      // [Load all your graphics and foolishness here]
  74.  
  75.  
  76.      LoadGraphic(Reimu1);
  77.      LoadGraphic(Koishi1);
  78.   //   LoadGraphic(Reimu2);
  79.     // LoadGraphic(Koishi2);
  80.      }
  81.      
  82.     @MainLoop{
  83.     SetChar(LEFT, Reimu1);      
  84.     SetGraphicRect(LEFT, 0, 0, 256, 320);           //The region you're displaying of the graphic for the player character, just like SetGraphicRect.
  85.     MoveChar(LEFT, BACK);                             //Move the player's character into the background, to show she is not speaking.
  86.     SetChar(RIGHT, Koishi1);                //Set the boss' picture on the right side of the screen.
  87.     SetGraphicRect(RIGHT, 2, 5, 256, 320);           //Set the boundry of the picture you want displayed.
  88.     MoveChar(RIGHT, FRONT);                          //Move the boss' image to the front to show that she is speaking.
  89.     TextOutA("So yeah I couldn't get the faces to display yet");           //Self explanatory. Danmakufu will not pass this function until a certain amount of time has passed, or the player clicks the shot button.
  90.     MoveChar(RIGHT, BACK);                           //Move the boss to the background, then...
  91.     MoveChar(LEFT, FRONT);                           //Move the player forward, to show that she will now speak.
  92.     TextOutA("So this is just a placeholder");
  93.     TextOutA("Enjoy!");                      //What the player will be speaking.
  94.     End;           //This ends the event.
  95.     }
  96.      
  97.      @Finalize{
  98.      // [delete all your graphics here]
  99.      }
  100.     }
Advertisement
Add Comment
Please, Sign In to add comment