Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Wind Bullets 2]
- #Text[(easy)]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main{
- let CSD = GetCurrentScriptDirectory;
- let intro = CSD ~ "img/MennesAnimation.png";
- let imgBoss = CSD ~ "img/Mennes.png";
- let attack = CSD ~ "img/Mennes2.png";
- let cut = CSD ~ "img/MennesCut.png";
- let bg = CSD ~ "img/Stars.png";
- let introdone = 0;
- let frame = 1;
- let frameX = 0;
- let frameY = 0;
- @Initialize{
- SetLife(1000);
- SetTimer(60);
- SetScore(100000);
- SetMovePosition01(GetCenterX,120,5);
- LoadGraphic(imgBoss);
- LoadGraphic(attack);
- LoadGraphic(cut);
- LoadGraphic(bg);
- CutIn(YOUMU,"Wind Bullets - easy -",cut,0,0,200,127);
- mainTask;
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,57);
- SetCollisionB(GetX,GetY,40);
- yield;
- }
- @DrawLoop{
- if(introdone == 0 && GetEnemyX == GetCenterX && GetEnemyY == 120) {
- if((frame/10 - truncate(frame/10)) == 0){
- frameX++;
- if(frameX == 4){
- frameX = 0;
- frameY++;
- if(frameY == 4){frameY = 0; }
- }
- }
- frame++;
- if(frame == 150){introdone = 1; }
- SetTexture(intro);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- SetGraphicRect(frameX*78,frameY*127,78+frameX*78,127+frameY*127);
- DrawGraphic(GetX,GetY);
- }
- if(introdone == 0 && (GetEnemyX != GetCenterX || GetEnemyY != 120)) {
- SetTexture(imgBoss);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- SetGraphicRect(0,0,78,114);
- DrawGraphic(GetX,GetY);
- }
- if(introdone == 1) {
- SetTexture(intro);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- SetGraphicRect(234,381,312,508);
- DrawGraphic(GetX,GetY);
- }
- }
- @BackGround{
- SetTexture(bg);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,512,512);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize{
- DeleteGraphic(imgBoss);
- DeleteGraphic(attack);
- DeleteGraphic(cut);
- DeleteGraphic(bg);
- }
- //main task, activates stuff
- task mainTask{
- if(introdone == 1){
- wait(120);
- yield;
- fire;
- movement;
- }
- }
- task movement{
- loop{
- SetMovePosition01(GetCenterX-100,120,5);
- wait(120);
- SetMovePosition01(GetCenterX+100,120,5);
- wait(120);
- yield;
- }
- }
- task fire{
- let x = 0;
- let dir = 0;
- loop{
- while ( x < 36 ) {
- let MouthY = GetEnemyY+30;
- CreateShotA(1,GetEnemyX+50*cos(dir),MouthY+50*sin(dir),30);
- SetShotDataA(1,0,0,dir,0,0,0,WHITE01);
- SetShotDataA(1,60,2,dir,0.5,0,2,WHITE01);
- FireShot(1);
- dir += 360/36;
- x++;
- }
- x = 0;
- dir = 0;
- wait(60);
- yield;
- }
- }
- //wait function
- function wait (w){
- loop(w){yield;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement