Advertisement
Guest User

Untitled

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