| ~Hakurei Shrine~ > Rika and Nitori's Garage Experiments |
| VGC's Stuff He Makes Because He's Bored |
| (1/1) |
| KomeijiKoishi:
Because everybody on this forum working with Danmakufu has his/her own thread, I decided to have one as well. And I have a spell card which should be tested: --- Code: ---#TouhouDanmakufu #Title[Sorry "But I can't think of any name for this card"] #Text[Test script] #BackGround[User(.\black.png, 1, 1)] #Player[FREE] #ScriptVersion[2] script_enemy_main { let ImgBoss = "script\img\ExRumia.png"; let count = -70; let fire = 0; @Initialize { SetLife(1000); SetDamageRate(10, 0); SetTimer(256); SetScore(1000000); SetInvincibility( 200 ); LoadGraphic(ImgBoss); SetMovePosition02(GetCenterX, GetCenterY - 120, 120); CutIn(YOUMU, "Sorry "\""But I can't think of any name for this card"\", "", 0, 0, 0, 0); LoadUserShotData("\CustomShots1.txt"); SetGraphicRect(0, 0, 64, 64); } @MainLoop { SetCollisionA(GetX, GetY, 32); SetCollisionB(GetX, GetY, 16); if ((count == 50)){ Rainbow; Shot; } count++; yield; } @DrawLoop { SetTexture(ImgBoss); DrawGraphic(GetX, GetY); } @Finalize { DeleteGraphic(ImgBoss); } task Shot{ let b = 0; let bup = 1; let reverse = 0; let lrar = 0; let kput = 1; let krar = 360/kput; let Length = 200; let n = 0; let q = 0; let RollerX; let RollerY; loop{ PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav"); ascent(a in 1..kput+1){ RollerX = GetX + Length * cos((a*krar+b)+1*(360/2)); RollerY = GetY + sin((a*krar+b)+1*(360/2)); CreateShot01(RollerX, RollerY, 1, (a*krar+b)+count*3, 131, 0); CreateShot01(RollerX, RollerY, 1, (a*krar+b)+120+count*3, 131, 0); CreateShot01(RollerX, RollerY, 1, (a*krar+b)+240+count*3, 131, 0); } if (reverse == 0){ if (bup < 80.7){ bup += 0; } else{ reverse++; } } else{ if (bup > -80.7){ bup -= 0; } else{ reverse--; } } b += bup; if (Length < 200){ Length += 0; reverse-- } if (Length > 200){ Length -= 1; reverse++ } loop(3){ yield; } } } task Rainbow{ let b = 0; let bup = 6.3; let reverse = 0; let lrar = 0; let kput = 18; let krar = 360/kput; let Length = 0; let n = 0; let q = 0; let RollerX; let RollerY; loop{ PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav"); ascent(a in 0..kput){ RollerX = GetX + Length * cos((a*krar+b)+1*(360/2)); RollerY = GetY + Length * sin((a*krar+b)+1*(360/2)); TheshotL(RollerX, RollerY, 0.1, (a*krar+b), 49, 0); TheshotR(RollerX, RollerY, 0.1, (a*krar+b), 49, 0); TheshotL(RollerX, RollerY, 0.3, (a*krar+b), 50, 6); TheshotR(RollerX, RollerY, 0.3, (a*krar+b), 50, 6); TheshotL(RollerX, RollerY, 0.5, (a*krar+b), 51, 12); TheshotR(RollerX, RollerY, 0.5, (a*krar+b), 51, 12); TheshotL(RollerX, RollerY, 0.7, (a*krar+b), 52, 18); TheshotR(RollerX, RollerY, 0.7, (a*krar+b), 52, 18); TheshotL(RollerX, RollerY, 0.9, (a*krar+b), 53, 24); TheshotR(RollerX, RollerY, 0.9, (a*krar+b), 53, 24); TheshotL(RollerX, RollerY, 1.1, (a*krar+b), 54, 30); TheshotR(RollerX, RollerY, 1.1, (a*krar+b), 54, 30); TheshotL(RollerX, RollerY, 1.3, (a*krar+b), 55, 36); TheshotR(RollerX, RollerY, 1.3, (a*krar+b), 55, 36); TheshotL(RollerX, RollerY, 1.5, (a*krar+b), 56, 42); TheshotR(RollerX, RollerY, 1.5, (a*krar+b), 56, 42); TheshotL(RollerX, RollerY, 1.7, (a*krar+b), 57, 48); TheshotR(RollerX, RollerY, 1.7, (a*krar+b), 57, 48); TheshotL(RollerX, RollerY, 1.9, (a*krar+b), 58, 54); TheshotR(RollerX, RollerY, 1.9, (a*krar+b), 58, 54); TheshotL(RollerX, RollerY, 2.1, (a*krar+b), 59, 60); TheshotR(RollerX, RollerY, 2.1, (a*krar+b), 59, 60); TheshotL(RollerX, RollerY, 2.3, (a*krar+b), 60, 66); TheshotR(RollerX, RollerY, 2.3, (a*krar+b), 60, 66); } if (reverse == 0){ if (bup < 80.7){ bup += 0; } else{ reverse++; } } else{ if (bup > -80.7){ bup -= 0; } else{ reverse--; } } b += bup; if (Length > -900){ Length -= 0; } loop(72){ yield; } } } task TheshotL(x, y, v, angle, graphic, delay){ let obj = Obj_Create(OBJ_SHOT); let a = 0; let b = 0; let dir = angle; Obj_SetX(obj, x); Obj_SetY(obj, y); Obj_SetSpeed(obj, 2.5); Obj_SetAngle(obj, angle); ObjShot_SetGraphic(obj, graphic); ObjShot_SetDelay(obj, delay); Obj_SetAutoDelete(obj, false); ObjShot_SetBombResist(obj, true); while (!Obj_BeDeleted(obj)){ if (a >= 0){ Obj_SetAngle(obj, angle+(a-delay)/1.8); } if (a >= 310+delay){ Obj_SetAutoDelete(obj, true); } a++; yield; } } task TheshotR(x, y, v, angle, graphic, delay){ let obj = Obj_Create(OBJ_SHOT); let a = 0; let b = 0; let dir = angle; Obj_SetX(obj, x); Obj_SetY(obj, y); Obj_SetSpeed(obj, 2.5); Obj_SetAngle(obj, angle); ObjShot_SetGraphic(obj, graphic); ObjShot_SetDelay(obj, delay); Obj_SetAutoDelete(obj, false); ObjShot_SetBombResist(obj, true); while (!Obj_BeDeleted(obj)){ if (a >= 0){ Obj_SetAngle(obj, angle-(a-delay)/1.8); } if (a >= 310+delay){ Obj_SetAutoDelete(obj, true); } a++; yield; } } } --- End code --- Make sure this script can use puremrz's shotdata. |
| Suikama:
It runs at like 30 fps for me ._. |
| KomeijiKoishi:
--- Quote from: Suikama on August 18, 2009, 03:48:59 PM ---It runs at like 30 fps for me ._. --- End quote --- Must be your PC. On mine it runs with 60 FPS. |
| KomeijiKoishi:
--- Code: ---#TouhouDanmakufu #Title[Rainbow "Wings"] #Text[Test script] #BackGround[User(.\black.png, 1, 1)] #Player[FREE] #ScriptVersion[2] script_enemy_main { let ImgBoss = "script\img\ExRumia.png"; let count = -70; let fire = 0; @Initialize { SetLife(1000); SetDamageRate(10, 0); SetTimer(256); SetScore(1000000); SetInvincibility( 200 ); LoadGraphic(ImgBoss); SetMovePosition02(GetCenterX, GetCenterY - 120, 120); CutIn(YOUMU, "Rainbow "\""Wings"\", "", 0, 0, 0, 0); LoadUserShotData("\CustomShots1.txt"); SetGraphicRect(0, 0, 64, 64); } @MainLoop { SetCollisionA(GetX, GetY, 32); SetCollisionB(GetX, GetY, 16); if ((count == 50)){ Rainbow; Shot; } count++; yield; } @DrawLoop { SetTexture(ImgBoss); DrawGraphic(GetX, GetY); } @Finalize { DeleteGraphic(ImgBoss); } task Shot{ let b = 0; let bup = 1; let reverse = 0; let lrar = 0; let kput = 9; let krar = 360/kput; let Length = 0; let n = 0; let q = 0; let RollerX; let RollerY; loop{ PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav"); ascent(a in 1..kput+1){ RollerX = GetX + Length * cos((a*krar+b)+1*(360/2)); RollerY = GetY + sin((a*krar+b)+1*(360/2)); CreateShot01(RollerX, RollerY, 1, GetAngleToPlayer, 131, 0+a*10); } if (reverse == 0){ if (bup < 80.7){ bup += 0; } else{ reverse++; } } else{ if (bup > -80.7){ bup -= 0; } else{ reverse--; } } b += bup; if (Length < 200){ Length += 0; reverse-- } if (Length > 200){ Length -= 1; reverse++ } loop(180){ yield; } } } task Rainbow{ let b = 0; let bup = 6.3; let reverse = 0; let lrar = 0; let kput = 12; let krar = 360/kput; let Length = 0; let n = 0; let q = 0; let RollerX; let RollerY; let C; loop{ PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav"); ascent(a in 0..kput){ RollerX = GetX + Length * cos((a*krar+b)+1*(360/2)); RollerY = GetY + Length * sin((a*krar+b)+1*(360/2)); C = rand(GetAngleToPlayer-3, GetAngleToPlayer+3); TheshotL(RollerX, RollerY, 1, C-120-count-a*5, 49+a, 0+a*5); TheshotL(RollerX, RollerY, 1, C-90-count-a*5, 49+a, 0+a*5); TheshotL(RollerX, RollerY, 1, C-60-count-a*5, 49+a, 0+a*5); TheshotR(RollerX, RollerY, 1, C+60+count+a*5, 49+a, 0+a*5); TheshotR(RollerX, RollerY, 1, C+90+count+a*5, 49+a, 0+a*5); TheshotR(RollerX, RollerY, 1, C+120+count+a*5, 49+a, 0+a*5); TheshotL(RollerX, RollerY, 1, C-120+count+a*5, 49+a, 0+a*5); TheshotL(RollerX, RollerY, 1, C-90+count+a*5, 49+a, 0+a*5); TheshotL(RollerX, RollerY, 1, C-60+count+a*5, 49+a, 0+a*5); TheshotR(RollerX, RollerY, 1, C+60-count-a*5, 49+a, 0+a*5); TheshotR(RollerX, RollerY, 1, C+90-count-a*5, 49+a, 0+a*5); TheshotR(RollerX, RollerY, 1, C+120-count-a*5, 49+a, 0+a*5); } if (reverse == 0){ if (bup < 80.7){ bup += 0; } else{ reverse++; } } else{ if (bup > -80.7){ bup -= 0; } else{ reverse--; } } b += bup; if (Length > -900){ Length -= 0; } loop(60){ yield; } } } task TheshotL(x, y, v, angle, graphic, delay){ let obj = Obj_Create(OBJ_SHOT); let a = 0; let b = 0; let dir = angle; Obj_SetX(obj, x); Obj_SetY(obj, y); Obj_SetSpeed(obj, 1.4); Obj_SetAngle(obj, angle); ObjShot_SetGraphic(obj, graphic); ObjShot_SetDelay(obj, delay); Obj_SetAutoDelete(obj, false); ObjShot_SetBombResist(obj, true); while (!Obj_BeDeleted(obj)){ if (a >= 0){ Obj_SetAngle(obj, angle+(a-delay)/3); } if (a >= 310+delay){ Obj_SetAutoDelete(obj, true); } a++; yield; } } task TheshotR(x, y, v, angle, graphic, delay){ let obj = Obj_Create(OBJ_SHOT); let a = 0; let b = 0; let dir = angle; Obj_SetX(obj, x); Obj_SetY(obj, y); Obj_SetSpeed(obj, 1.4); Obj_SetAngle(obj, angle); ObjShot_SetGraphic(obj, graphic); ObjShot_SetDelay(obj, delay); Obj_SetAutoDelete(obj, false); ObjShot_SetBombResist(obj, true); while (!Obj_BeDeleted(obj)){ if (a >= 0){ Obj_SetAngle(obj, angle-(a-delay)/3); } if (a >= 310+delay){ Obj_SetAutoDelete(obj, true); } a++; yield; } } } --- End code --- An altered version of the first card. |
| Navigation |
| Message Index |