SHOW:
|
|
- or go back to the newest paste.
| 1 | #TouhouDanmakufu [Single] | |
| 2 | #Title[DDD Part 34a] | |
| 3 | #Text[Danmaku dodging for Dummies part 34a | |
| 4 | Love Sign: Master Spark] | |
| 5 | #Player[FREE] | |
| 6 | #ScriptVersion[2] | |
| 7 | //This is uploaded, Feb 10, 2013 | |
| 8 | ||
| 9 | script_enemy_main {
| |
| 10 | #include_function ".\function_cutin.txt"; | |
| 11 | let count = -60; //Counter | |
| 12 | let angle = 22.5; //Primary Angle | |
| 13 | let angle2 = 45; //Secondary Angle | |
| 14 | let angle3 = 0; //Tertiary Angle | |
| 15 | let bulletID = 5; //Bullet ID # | |
| 16 | let wvel = 0.25; //Angular Velocity | |
| 17 | let BossImage = GetCurrentScriptDirectory~"yukkuri2.png"; | |
| 18 | let BossCutIn = GetCurrentScriptDirectory~"yukkuri2.png"; | |
| 19 | let bullet = GetCurrentScriptDirectory~"bullet.wav"; | |
| 20 | let laser = GetCurrentScriptDirectory~"laser.wav"; | |
| 21 | let spark = GetCurrentScriptDirectory~"spark.wav"; | |
| 22 | let ZUNbullet = GetCurrentScriptDirectory~"supershot.txt"; | |
| 23 | ||
| 24 | @Initialize {
| |
| 25 | LoadGraphic(BossImage); | |
| 26 | LoadGraphic(BossCutIn); | |
| 27 | LoadUserShotData(ZUNbullet); | |
| 28 | SetLife(5000); | |
| 29 | SetDamageRate(80, 40); //% of shot damage, % of bomb damage | |
| 30 | SetTimer(50); | |
| 31 | SetInvincibility(30); | |
| 32 | cutin("BYAKUREN","Love Sign "\""Master Spark"\",BossCutIn,0,0,207,234);
| |
| 33 | SetScore(1000000); | |
| 34 | SetEnemyMarker(true); | |
| 35 | SetDurableSpellCard; | |
| 36 | //LastSpell; | |
| 37 | Concentration01(30); //Frames to charge energy | |
| 38 | MagicCircle(true); | |
| 39 | //SetEffectForZeroLife(30, 130, 0); //TimeIntensitySlowdown0=none | |
| 40 | SetMovePosition02(GetCenterX, GetCenterY - 150, 30); | |
| 41 | LoadSE(bullet); | |
| 42 | LoadSE(laser); | |
| 43 | LoadSE(spark); | |
| 44 | } | |
| 45 | ||
| 46 | @MainLoop {
| |
| 47 | SetCollisionA(GetX, GetY, 32); | |
| 48 | SetCollisionB(GetX, GetY, 24); | |
| 49 | if(count % 720 == 540){
| |
| 50 | SetMovePosition03(GetPlayerX, GetCenterY - rand(60,180), 5, 1); | |
| 51 | //Xcor,Ycor,weight deceleration (lower = fluid), velocity | |
| 52 | } | |
| 53 | if(count % 720 == 20){
| |
| 54 | Spark; | |
| 55 | PlaySE(spark); | |
| 56 | } | |
| 57 | if(count > 100 && count % 720 < 480 && count % 24 == 0){
| |
| 58 | bulletID = rand_int(195,196); | |
| 59 | loop(15){
| |
| 60 | CreateShot01(GetX, GetY, 1.5, angle, bulletID, 10); | |
| 61 | angle+=24; | |
| 62 | } | |
| 63 | PlaySE(bullet); | |
| 64 | angle+=12; | |
| 65 | } | |
| 66 | count++; | |
| 67 | yield; | |
| 68 | } | |
| 69 | ||
| 70 | @DrawLoop {
| |
| 71 | SetTexture(BossImage); | |
| 72 | SetGraphicRect(0, 0, 207, 234); //Add one pixel to height and width | |
| 73 | SetAlpha(250); | |
| 74 | SetGraphicAngle(0, 0, 0); | |
| 75 | SetGraphicScale(0.5, 0.5); | |
| 76 | DrawGraphic(GetX,GetY); | |
| 77 | } | |
| 78 | ||
| 79 | task Spark{
| |
| 80 | let sparkE = Obj_Create(OBJ_EFFECT); | |
| 81 | let sparkimg = GetCurrentScriptDirectory~"spell.png"; | |
| 82 | let sparkS; | |
| 83 | ||
| 84 | Obj_SetPosition(sparkE, GetX, GetY); | |
| 85 | ObjEffect_SetAngle(sparkE, 0, 0, GetAngleToPlayer); | |
| 86 | ObjEffect_SetTexture(sparkE, sparkimg); | |
| 87 | ObjEffect_SetRenderState(sparkE, ALPHA); | |
| 88 | ObjEffect_SetPrimitiveType(sparkE, PRIMITIVE_TRIANGLEFAN); | |
| 89 | ObjEffect_CreateVertex(sparkE, 4); | |
| 90 | ObjEffect_SetVertexUV(sparkE,0, 0, 128); | |
| 91 | ObjEffect_SetVertexUV(sparkE,1, 0, 0); | |
| 92 | ObjEffect_SetVertexUV(sparkE,2, 256, 0); | |
| 93 | ObjEffect_SetVertexUV(sparkE,3, 256, 128); | |
| 94 | ObjEffect_SetVertexXY(sparkE,0, 0, 64); | |
| 95 | ObjEffect_SetVertexXY(sparkE,1, 0, -64); | |
| 96 | ObjEffect_SetVertexXY(sparkE,2, 256, 64); | |
| 97 | ObjEffect_SetVertexXY(sparkE,3, 256, -64) | |
| 98 | ascent(i in 0..4){ObjEffect_SetVertexColor(sparkE, i, 255, 255, 255, 255);}
| |
| 99 | ||
| 100 | ObjEffect_SetScale(sparkE, 0.01, 2); //display thin laser | |
| 101 | loop(120){ yield; } //few frames of delay without laser hitbox
| |
| 102 | ||
| 103 | //delay done, actually fire laser | |
| 104 | sparkS = Obj_Create(OBJ_LASER); | |
| 105 | Obj_SetPosition(sparkS, GetX, GetY); | |
| 106 | Obj_SetAngle(sparkS, GetAngleToPlayer); | |
| 107 | Obj_SetSpeed(sparkS, 0); | |
| 108 | Obj_SetAlpha(sparkS, 200); //not sure why this is even here if the laser is invisible | |
| 109 | ObjLaser_SetLength(sparkS, 512); | |
| 110 | ObjLaser_SetSource(sparkS, false); | |
| 111 | ||
| 112 | ascent(i in 1..121){
| |
| 113 | ObjLaser_SetWidth(sparkS, i); //widen laser hitbox | |
| 114 | ObjEffect_SetScale(sparkE, i/120, 2); //widen laser graphic | |
| 115 | yield; | |
| 116 | } | |
| 117 | ||
| 118 | loop(360){yield;} //some frames with the laser at full size
| |
| 119 | ||
| 120 | descent(i in 1..121){
| |
| 121 | ObjLaser_SetWidth(sparkS, i); //widen laser hitbox | |
| 122 | ObjEffect_SetScale(sparkE, i/120, 2); //widen laser graphic | |
| 123 | yield; | |
| 124 | } | |
| 125 | ||
| 126 | Obj_Delete(sparkS); | |
| 127 | Obj_Delete(sparkE); | |
| 128 | } | |
| 129 | ||
| 130 | ||
| 131 | @Finalize {
| |
| 132 | DeleteGraphic(BossImage); | |
| 133 | DeleteGraphic(BossCutIn); | |
| 134 | DeleteSE(bullet); | |
| 135 | DeleteSE(laser); | |
| 136 | DeleteSE(spark); | |
| 137 | } | |
| 138 | ||
| 139 | @BackGround {
| |
| 140 | } | |
| 141 | } |