Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Fallen Sign - Zombie Driver -]
- #Text[o3o]
- #Player[FREE]
- #ScriptVersion[2]
- #BGM[.\bgm\th13_07.mp3]
- script_enemy_main{
- #include_function ".\system\function_cutin.txt";
- let CSD = GetCurrentScriptDirectory;
- let imgboss = CSD ~ "system\enemy.png";
- let cut = CSD ~ "system\Front.png";
- let bg1 = CSD ~ "system\cdbg03a.png";
- let bg2 = CSD ~ "system\cdbg03b.png";
- let slide=0;
- @Initialize{
- SetLife(1000);
- SetDamageRate(25,15);
- SetTimer(52);
- SetScore(100000);
- SetMovePosition01(GetCenterX,GetCenterY,5);
- LoadGraphic(imgboss);
- LoadGraphic(cut);
- LoadGraphic(bg1);
- LoadGraphic(bg2);
- cutin("NAZRIN","Fallen Sign - Zombie Driver -",cut,0,0,238,480);
- mainTask;
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,16);
- SetCollisionB(GetX,GetY,8);
- yield;
- }
- @DrawLoop{
- SetTexture(imgboss);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,52,82);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetX,GetY);
- }
- @BackGround{
- SetTexture(bg1);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,384,448);
- SetGraphicScale(1.5,1.5);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX,GetCenterY);
- SetTexture(bg2);
- SetRenderState(ADD);
- SetGraphicRect(0,0,2000000,2000000);
- SetGraphicScale(0.5,0.5);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX+slide,GetCenterY+slide);
- slide+=2;
- }
- @Finalize{
- DeleteGraphic(imgboss);
- DeleteGraphic(cut);
- DeleteGraphic(bg1);
- DeleteGraphic(bg2);
- }
- task mainTask{
- wait(80);
- yield;
- movement;
- fire2;
- }
- task movement{
- loop{
- SetMovePositionRandom01(60,30,10,GetCenterX-120,GetCenterY-100,GetCenterX+120,GetCenterY-100);
- wait(20);
- PlaySE(CSD ~ "sfx\charging.wav");
- SetColor(128,128,255);
- Concentration01(80);
- SetColor(255,255,255);
- wait(20);
- fire;
- wait(120);
- yield;
- }
- }
- task fire2{
- let x = 0;
- let dir = 0;
- loop{
- while(x<36){
- CreateShotA(1,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
- SetShotDataA(1,0,1,dir,-0.2,0,1,AQUA31);
- FireShot(1);
- CreateShotA(2,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
- SetShotDataA(2,0,1,dir,0.2,0,1,PURPLE31);
- FireShot(2);
- dir+=350/36;
- x++;
- }
- x = 0;
- dir = 0;
- wait(90);
- yield;
- }
- }
- task fire{
- let x = 0;
- let dir = rand_int(0,359);
- PlaySE(CSD ~ "sfx\shot.wav");
- while(x<16){
- kunai(GetEnemyX+60*cos(dir),GetEnemyY+60*cos(dir),3,dir,PURPLE03,0);
- dir+=22.5;
- x++;
- }
- }
- task kunai(x,y,v,dir,graphic,delay){
- let Obj = Obj_Create(OBJ_SHOT);
- Obj_SetPosition(Obj,x,y);
- Obj_SetSpeed(Obj,v);
- Obj_SetAngle(Obj,dir);
- ObjShot_SetGraphic(Obj,graphic);
- ObjShot_SetDelay(Obj,delay);
- ObjShot_SetBombResist(Obj,true);
- while(!Obj_BeDeleted(Obj)){
- wait(10);
- Obj_SetSpeed(Obj,0);
- Concentration02(15);
- wait(20);
- ObjShot_SetGraphic(Obj,YELLOW31);
- PlaySE(CSD ~ "sfx\shot2.wav");
- loop(5){
- CreateLaserC(1,Obj_GetX(Obj),Obj_GetY(Obj),400,200,YELLOW01,0);
- SetLaserDataC(1,0,5,GetAngleToPlayer,0.2,0,0);
- }
- wait(30);
- ObjShot_FadeDelete(Obj);
- yield;
- }
- }
- function wait(w){
- loop(w){yield;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement