SHOW:
|
|
- or go back to the newest paste.
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 | ||
12 | let CSD = GetCurrentScriptDirectory; | |
13 | - | let imagefile = GetCurrentScriptDirectory ~ "Palace.png"; |
13 | + | let imagefile = CSD ~ "Palace.png"; |
14 | ||
15 | let mov1 =0; | |
16 | let mov2 =0; | |
17 | ||
18 | function WaitForNoEvent { while(OnEvent) { yield; } } | |
19 | function Wait(let frames){ | |
20 | loop(frames){yield;} | |
21 | } | |
22 | function WaitForZeroEnemy{ | |
23 | while(GetEnemyNum != 0){yield;} | |
24 | } | |
25 | task stage{ | |
26 | Wait(120); | |
27 | CreateEventFromScript("name"); | |
28 | WaitForNoEvent; | |
29 | CreateEnemyBossFromFile(GetCurrentScriptDirectory~"Koishi's fun time.txt", 0, 0, 0, 0, 0); | |
30 | WaitForZeroEnemy; | |
31 | Wait(60); | |
32 | Clear; | |
33 | } | |
34 | ||
35 | @Initialize{ | |
36 | LoadGraphic(imagefile); | |
37 | stage; | |
38 | } | |
39 | @MainLoop{ | |
40 | mov1++; | |
41 | mov2++; | |
42 | yield; | |
43 | ||
44 | ||
45 | ||
46 | } | |
47 | @BackGround{ | |
48 | ||
49 | ||
50 | // Draw a simple text message | |
51 | // Arguments: outputted text , X , Y , text size , alpha value | |
52 | // - Text size is the height of the text | |
53 | // - Alpha will be covered in the next section | |
54 | DrawText("Koishi Komeji", 50, 50, 12, 255); | |
55 | ||
56 | // Set our image file to be active texture | |
57 | SetTexture(imagefile); | |
58 | ||
59 | // Set the area of the image file we want to use (in this case, the entire 128x128 file) | |
60 | // Arguments: left-side x , top-side y , right-side x , bottom-side y | |
61 | SetGraphicRect(0, 0, 256*999, 256*999); | |
62 | ||
63 | // Draw the graphic onto the screen | |
64 | SetViewTo(0, -500, mov2); // 150 60 | |
65 | SetViewFrom(10, -86, 60); // 10 -86 60 | |
66 | SetGraphicAngle(100,0,5); // flip,turn,spin | |
67 | SetGraphicScale ( 1, 1); | |
68 | // DrawGraphic(GetCenterX(), GetCenterY()); | |
69 | DrawGraphic3D(-50, -800, 1000); | |
70 | ||
71 | } | |
72 | @Finalize{ | |
73 | ||
74 | } | |
75 | ||
76 | } | |
77 | script_event name{ | |
78 | ||
79 | let CSD = GetCurrentScriptDirectory; | |
80 | ||
81 | - | let Reimu1 = GetCurrentScriptDirectory ~ "Reimu Pic1.png"; |
81 | + | let Reimu1 = CSD ~ "Reimu Pic1.png"; |
82 | - | let Koishi1 = GetCurrentScriptDirectory ~ "Koishi Pic1.png"; |
82 | + | let Koishi1 = CSD ~ "Koishi Pic1.png"; |
83 | - | let Reimu2 = GetCurrentScriptDirectory ~ "Reimu Pic2.png"; |
83 | + | let Reimu2 = CSD ~ "Reimu Pic2.png"; |
84 | - | let Koishi2 = GetCurrentScriptDirectory ~ "Koishi Pic2.png"; |
84 | + | let Koishi2 = CSD ~ "Koishi Pic2.png"; |
85 | ||
86 | @Initialize{ | |
87 | LoadGraphic(Reimu1); | |
88 | LoadGraphic(Koishi1); | |
89 | LoadGraphic(Reimu2); | |
90 | LoadGraphic(Koishi2); | |
91 | } | |
92 | ||
93 | @MainLoop{ | |
94 | SetChar(LEFT, "Reimu1"); //Set the player's character on the left side, with the graphic you've told it to display. | |
95 | SetGraphicRect(LEFT, 0, 0, 256, 320); //The region you're displaying of the graphic for the player character, just like SetGraphicRect. | |
96 | MoveChar(LEFT, BACK); //Move the player's character into the background, to show she is not speaking. | |
97 | SetChar(RIGHT, "Koishi1"); //Set the boss' picture on the right side of the screen. | |
98 | SetGraphicRect(RIGHT, 2, 5, 256, 320); //Set the boundry of the picture you want displayed. | |
99 | MoveChar(RIGHT, FRONT); //Move the boss' image to the front to show that she is speaking. | |
100 | 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. | |
101 | MoveChar(RIGHT, BACK); //Move the boss to the background, then... | |
102 | MoveChar(LEFT, FRONT); //Move the player forward, to show that she will now speak. | |
103 | TextOutA("So this is just a placeholder"); | |
104 | TextOutA("Enjoy!"); //What the player will be speaking. | |
105 | End; //This ends the event. | |
106 | } | |
107 | ||
108 | @Finalize{ | |
109 | DeleteGraphic(Reimu1); | |
110 | DeleteGraphic(Koishi1); | |
111 | DeleteGraphic(Reimu2); | |
112 | DeleteGraphic(Koishi2); | |
113 | ||
114 | } | |
115 | } |