SHOW:
|
|
- or go back to the newest paste.
| 1 | #TouhouDanmakufu[Stage] | |
| 2 | #Title[Stage for Koishi] | |
| 3 | - | #TouhouDanmakufu[Stage] |
| 3 | + | #Text[] |
| 4 | - | #Title[Stage for Koishi] |
| 4 | + | #Image[] |
| 5 | - | #Text[] |
| 5 | + | #Background[] |
| 6 | - | #Image[] |
| 6 | + | #BGM[] |
| 7 | - | #Background[] |
| 7 | + | #Player[FREE] |
| 8 | - | #BGM[] |
| 8 | + | #ScriptVersion[2] |
| 9 | - | #Player[FREE] |
| 9 | + | |
| 10 | - | #ScriptVersion[2] |
| 10 | + | script_stage_main{
|
| 11 | let imagefile = GetCurrentScriptDirectory ~ "Palace.png"; | |
| 12 | - | script_stage_main{
|
| 12 | + | |
| 13 | - | let imagefile = GetCurrentScriptDirectory ~ "Palace.png"; |
| 13 | + | function WaitForNoEvent { while(OnEvent) { yield; } }
|
| 14 | function Wait(let frames){
| |
| 15 | - | function WaitForNoEvent { while(OnEvent) { yield; } }
|
| 15 | + | loop(frames){yield;}
|
| 16 | - | function Wait(let frames){
|
| 16 | + | |
| 17 | - | loop(frames){yield;}
|
| 17 | + | function WaitForZeroEnemy{
|
| 18 | - | } |
| 18 | + | while(GetEnemyNum != 0){yield;}
|
| 19 | - | function WaitForZeroEnemy{
|
| 19 | + | |
| 20 | - | while(GetEnemyNum != 0){yield;}
|
| 20 | + | task stage{
|
| 21 | - | } |
| 21 | + | Wait(120); |
| 22 | - | task stage{
|
| 22 | + | CreateEventFromScript("name");
|
| 23 | - | Wait(120); |
| 23 | + | WaitForNoEvent; |
| 24 | - | CreateEventFromScript("name");
|
| 24 | + | CreateEnemyBossFromFile(GetCurrentScriptDirectory~"Koishi's fun time.txt", 0, 0, 0, 0, 0); |
| 25 | - | WaitForNoEvent; |
| 25 | + | WaitForZeroEnemy; |
| 26 | - | CreateEnemyBossFromFile(GetCurrentScriptDirectory~"Koishi's fun time.txt", 0, 0, 0, 0, 0); |
| 26 | + | Wait(60); |
| 27 | - | WaitForZeroEnemy; |
| 27 | + | Clear; |
| 28 | - | Wait(60); |
| 28 | + | |
| 29 | - | Clear; |
| 29 | + | |
| 30 | - | } |
| 30 | + | |
| 31 | LoadGraphic(imagefile); | |
| 32 | - | @Initialize{
|
| 32 | + | stage; |
| 33 | - | LoadGraphic(imagefile); |
| 33 | + | |
| 34 | - | stage; |
| 34 | + | |
| 35 | - | } |
| 35 | + | |
| 36 | - | @MainLoop{
|
| 36 | + | yield; |
| 37 | - | yield; |
| 37 | + | |
| 38 | - | } |
| 38 | + | |
| 39 | - | @BackGround{
|
| 39 | + | @BackGround{
|
| 40 | // Draw a simple text message | |
| 41 | // Arguments: outputted text , X , Y , text size , alpha value | |
| 42 | - | // Draw a simple text message |
| 42 | + | // - Text size is the height of the text |
| 43 | - | // Arguments: outputted text , X , Y , text size , alpha value |
| 43 | + | // - Alpha will be covered in the next section |
| 44 | - | // - Text size is the height of the text |
| 44 | + | DrawText("Koishi Komeji", 50, 50, 12, 255);
|
| 45 | - | // - Alpha will be covered in the next section |
| 45 | + | |
| 46 | - | DrawText("Koishi Komeji", 50, 50, 12, 255);
|
| 46 | + | // Set our image file to be active texture |
| 47 | SetTexture(imagefile); | |
| 48 | - | // Set our image file to be active texture |
| 48 | + | |
| 49 | - | SetTexture(imagefile); |
| 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 | - | // Set the area of the image file we want to use (in this case, the entire 128x128 file) |
| 51 | + | SetGraphicRect(0, 0, 256, 256); |
| 52 | - | // Arguments: left-side x , top-side y , right-side x , bottom-side y |
| 52 | + | |
| 53 | - | SetGraphicRect(0, 0, 256, 256); |
| 53 | + | // Draw the graphic onto the screen |
| 54 | SetGraphicScale ( 1.5, 1.7); | |
| 55 | - | // Draw the graphic onto the screen |
| 55 | + | DrawGraphic(GetCenterX(), GetCenterY()); |
| 56 | - | SetGraphicScale ( 1.5, 1.7); |
| 56 | + | |
| 57 | - | DrawGraphic(GetCenterX(), GetCenterY()); |
| 57 | + | |
| 58 | } | |
| 59 | ||
| 60 | - | } |
| 60 | + | @Finalize{
|
| 61 | - | @Finalize{
|
| 61 | + | |
| 62 | } | |
| 63 | - | } |
| 63 | + | |
| 64 | } | |
| 65 | ||
| 66 | - | script_event name{
|
| 66 | + | script_event name{
|
| 67 | - | let Reimu1 = GetCurrentScriptDirectory ~ "Reimu Pic1.png"; |
| 67 | + | let Reimu1 = GetCurrentScriptDirectory ~ "Reimu Pic1.png"; |
| 68 | - | let Koishi1 = GetCurrentScriptDirectory ~ "Koishi Pic1.png;"; |
| 68 | + | let Koishi1 = GetCurrentScriptDirectory ~ "Koishi Pic1.png"; |
| 69 | - | let Reimu2 = GetCurrentScriptDirectory ~ "Reimu Pic2.png"; |
| 69 | + | let Reimu2 = GetCurrentScriptDirectory ~ "Reimu Pic2.png"; |
| 70 | - | let Koishi2 = GetCurrentScriptDirectory ~ "Koishi Pic2.png;"; |
| 70 | + | let Koishi2 = GetCurrentScriptDirectory ~ "Koishi Pic2.png;"; |
| 71 | ||
| 72 | @Initialize{
| |
| 73 | - | // [Load all your graphics and foolishness here] |
| 73 | + | |
| 74 | // [Load all your graphics and foolishness here] | |
| 75 | LoadGraphic(Reimu1); | |
| 76 | - | LoadGraphic(Reimu1); |
| 76 | + | LoadGraphic(Koishi1); |
| 77 | - | LoadGraphic(Koishi1); |
| 77 | + | //LoadGraphic(Reimu2); |
| 78 | - | // LoadGraphic(Reimu2); |
| 78 | + | //LoadGraphic(Koishi2); |
| 79 | - | // LoadGraphic(Koishi2); |
| 79 | + | |
| 80 | - | } |
| 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 | - | SetChar(LEFT, Reimu1); |
| 83 | + | SetGraphicRect(LEFT, 0, 0, 256, 320); //The region you're displaying of the graphic for the player character, just like SetGraphicRect. |
| 84 | - | 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 | - | 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 | - | 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 | - | 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 | - | 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 | - | 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(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 | - | MoveChar(LEFT, FRONT); //Move the player forward, to show that she will now speak. |
| 91 | + | TextOutA("So this is just a placeholder");
|
| 92 | - | TextOutA("So this is just a placeholder");
|
| 92 | + | TextOutA("Enjoy!"); //What the player will be speaking.
|
| 93 | - | TextOutA("Enjoy!"); //What the player will be speaking.
|
| 93 | + | End; //This ends the event. |
| 94 | - | End; //This ends the event. |
| 94 | + | |
| 95 | ||
| 96 | @Finalize{
| |
| 97 | - | @Finalize{
|
| 97 | + | // [delete all your graphics here] |
| 98 | - | // [delete all your graphics here] |
| 98 | + | |
| 99 | - | } |
| 99 | + | } |