SHOW:
|
|
- or go back to the newest paste.
| 1 | #TouhouDanmakufu | |
| 2 | #Title[Stage 2 - Easy] | |
| 3 | #Text[Phantasmagoria of Temporal Loop] | |
| 4 | #Player[FREE] | |
| 5 | #ScriptVersion[2] | |
| 6 | ||
| 7 | script_stage_main{
| |
| 8 | let floor = GetCurrentScriptDirectory ~ "\sprite\floor.png"; | |
| 9 | let water1 = GetCurrentScriptDirectory ~ "\sprite\water.png"; | |
| 10 | let green = GetCurrentScriptDirectory ~ "\sprite\green.png"; | |
| 11 | let green2 = GetCurrentScriptDirectory ~ "\sprite\green2.png"; | |
| 12 | let banner = GetCurrentScriptDirectory ~ "\sprite\banner.png"; | |
| 13 | let Y = 0; | |
| 14 | let Y2 = -60; | |
| 15 | let X = 0; | |
| 16 | let X3 = 0; | |
| 17 | let Y3 = 0; | |
| 18 | let alphalevel = 255; | |
| 19 | ||
| 20 | @Initialize{
| |
| 21 | LoadGraphic(banner); //banner | |
| 22 | LoadGraphic(floor); //ocean floor | |
| 23 | LoadGraphic(water1); //water | |
| 24 | LoadGraphic(green); //foliage 1 | |
| 25 | LoadGraphic(green2);//foliage 2 | |
| 26 | stage; | |
| 27 | } | |
| 28 | @BackGround{
| |
| 29 | SetFog (90, 180, 0, 128, 0); //the numbers need tweaking | |
| 30 | alphalevel-=1; | |
| 31 | if(Y2>-45){
| |
| 32 | Y2=-45; | |
| 33 | } | |
| 34 | Y+=0.5; | |
| 35 | X-=0.5; | |
| 36 | X3+=0.1; | |
| 37 | Y3-=0.1; | |
| 38 | Y2+=0.1; | |
| 39 | SetViewFrom(120, 90, -60); | |
| 40 | WriteZBuffer(true); | |
| 41 | UseZBuffer(true); | |
| 42 | SetTexture(floor); | |
| 43 | SetAlpha(156); | |
| 44 | SetGraphicRect(0,0,50*256,50*256); | |
| 45 | DrawGraphic3D(X,X,0); | |
| 46 | SetTexture(water1); | |
| 47 | SetAlpha(128); | |
| 48 | SetGraphicRect(0,0,50*256,50*256); | |
| 49 | DrawGraphic3D(Y,X,0); | |
| 50 | SetTexture(water1); | |
| 51 | SetAlpha(128); | |
| 52 | SetGraphicRect(0,0,50*256,50*256); | |
| 53 | DrawGraphic3D(Y,Y,0); | |
| 54 | SetTexture(green); | |
| 55 | SetAlpha(255); | |
| 56 | SetGraphicRect(0,0,25*256,25*256); | |
| 57 | SetGraphicScale(0.5,0.5); | |
| 58 | DrawGraphic3D(-Y3,X3,0); | |
| 59 | SetTexture(green2); | |
| 60 | SetAlpha(255); | |
| 61 | SetGraphicRect(0,0,25*256,25*256); | |
| 62 | SetGraphicScale(0.5,0.5); | |
| 63 | DrawGraphic3D(X3,-Y3,0); | |
| 64 | SetTexture(banner); | |
| 65 | SetGraphicScale(1,1); | |
| 66 | SetAlpha(alphalevel); | |
| 67 | SetGraphicRect(0,0,359,117); | |
| 68 | DrawGraphic(GetCenterX,GetCenterY-100); | |
| 69 | } | |
| 70 | ||
| 71 | task stage{
| |
| 72 | Wait(255); | |
| 73 | DeleteGraphic(banner); | |
| 74 | Wait(120); | |
| 75 | CreateEnemyFromFile(GetCurrentScriptDirectory ~ "enemy\1.txt", GetClipMinX, 0, 0, 0, 0); | |
| 76 | WaitForZeroEnemy; | |
| 77 | CreateEnemyFromFile(GetCurrentScriptDirectory ~ "enemy\1.txt", GetClipMinX, 0, 0, 0, 0); | |
| 78 | WaitForZeroEnemy; | |
| 79 | CreateEnemyFromFile(GetCurrentScriptDirectory ~ "enemy\1.txt", GetClipMinX, 0, 0, 0, 0); | |
| 80 | WaitForZeroEnemy; | |
| 81 | CreateEnemyFromFile(GetCurrentScriptDirectory ~ "enemy\1.txt", GetClipMinX, 0, 0, 0, 0); | |
| 82 | WaitForZeroEnemy; | |
| 83 | CreateEnemyFromFile(GetCurrentScriptDirectory ~ "enemy\1.txt", GetClipMinX, 0, 0, 0, 0); | |
| 84 | WaitForZeroEnemy; | |
| 85 | CreateEnemyFromFile(GetCurrentScriptDirectory ~ "enemy\1.txt", GetClipMinX, 0, 0, 0, 0); | |
| 86 | WaitForZeroEnemy; | |
| 87 | WaitForZeroBullet; | |
| 88 | Wait(240); | |
| 89 | Clear; | |
| 90 | } | |
| 91 | ||
| 92 | ||
| 93 | @MainLoop{
| |
| 94 | yield; | |
| 95 | } | |
| 96 | ||
| 97 | ||
| 98 | @Finalize{
| |
| 99 | } | |
| 100 | ||
| 101 | function WaitForZeroEnemy{
| |
| 102 | while(GetEnemyNum != 0){yield;}
| |
| 103 | } | |
| 104 | function WaitForZeroBullet{
| |
| 105 | while(GetEnemyShotCount != 0){yield;}
| |
| 106 | } | |
| 107 | function Wait(let frames){
| |
| 108 | loop(frames){yield;}
| |
| 109 | } | |
| 110 | } |