Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Idea 1 [S1_B 3S]]
- #Text[Stage 1
- Boss
- Spell #3]
- #BackGround[Default]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main {
- let imgExRumia="script\img\ExRumia.png";
- let imgExRumiaBack ="script\ExRumia\img\ExRumiaBack.png";
- @Initialize {
- SetDamageRate(0,0);
- LoadGraphic(imgExRumia);
- LoadGraphic(imgExRumiaBack);
- TMain;
- }
- @MainLoop {
- SetCollisionA(GetX,GetY,32);
- SetCollisionB(GetX,GetY,24);
- yield;
- }
- @Finalize {
- DeleteGraphic(imgExRumia);
- DeleteGraphic(imgExRumiaBack);
- }
- @BackGround {
- SetTexture(imgExRumiaBack);
- SetGraphicRect(0,0,384,448);
- DrawGraphic(GetCenterX, GetCenterY);
- }
- let exrumiaattackframe = 0;
- function ExRumiaAddActionFrames(frames) { exrumiaattackframe += frames; }
- function ExRumiaSetActionFrames(frames) { exrumiaattackframe = frames; }
- @DrawLoop {
- SetTexture(imgExRumia);
- SetGraphicRect(0,0,64,64);
- if(GetSpeedX == 0) {
- if(exrumiaattackframe == 0) {
- SetGraphicRect(0,0,64,64);
- } else {
- SetGraphicRect(65,0,128,64);
- exrumiaattackframe--;
- }
- if(exrumiaattackframe < 0){
- exrumiaattackframe = 0;
- }
- } else if(GetSpeedX < 0) {
- SetGraphicRect(129,0,192,64);
- } else if(GetSpeedX > 0) {
- SetGraphicRect(193,0,256,64);
- }
- DrawGraphic(GetX, GetY);
- }
- function wait(let frames) { loop(frames) { yield; } }
- function waitInvincible(let frames) { loop(frames) { SetInvincibility(2); yield; } }
- task TMain {
- SetX(GetClipMinX); SetY(0);
- SetLife(10000);
- SetTimer(55);
- SetInvincibility(120);
- SetMovePosition03(GetCenterX, GetCenterY/2, 9, 17);
- waitInvincible(45);
- SetText("Greenhouse "\""Wild Planting Dance"\"); SetScore(1200000);
- MagicCircle(false); SetEnemyMarker(true);
- SetEffectForZeroLife(150, 0, 0);
- SetShotAutoDeleteClip(200, 200, 200, 30);
- waitInvincible(120);
- uno(GetAngleToPlayer, rand(0,360), RED01);
- }
- task uno(angle,angolo,g){let gr=0;
- let obj=Obj_Create(OBJ_LASER);
- Obj_SetPosition(obj, GetCenterX, GetCenterY);
- Obj_SetAngle(obj, angle+gr);
- ObjShot_SetGraphic(obj, g);
- ObjShot_SetDelay (obj, 30);
- ObjShot_SetBombResist (obj, true);
- ObjLaser_SetLength(obj, 200);
- ObjLaser_SetWidth (obj, 15);
- ObjLaser_SetSource(obj, false);
- gr+=1/60;while(Obj_BeDeleted(obj)==false) {
- Obj_SetPosition(obj, Obj_GetX(obj)+(4)*cos(angolo), Obj_GetY(obj)+(4)*sin(angolo)); if(Obj_GetX(obj)<GetClipMinX) {
- angolo=180-angolo; }
- if(Obj_GetX(obj)>GetClipMaxX) {
- angolo=180-angolo;
- }
- if(Obj_GetY(obj)<GetClipMinY) {
- angolo=-angolo;
- }
- if(Obj_GetY(obj)>GetClipMaxY) {
- angolo=-angolo;
- }
- yield;
- } }
- }
Advertisement
Add Comment
Please, Sign In to add comment