Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[try to spin]
- #Text[just a tutorial to present it]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main{
- let CSD = GetCurrentScriptDirectory;
- let imgBoss = CSD ~ "img\Sprite.png";
- let cut = CSD ~ "img\Cut.png";
- let bg = CSD ~ "img\lake.png";
- let bgm = CSD ~ "bmg\Legendary Illusion ~ Infinite Being.mp3";
- let angle =0;
- let angleAcc = 0;
- let frame=0;
- let time= 0;
- @Initialize{
- SetLife(1000);
- SetTimer(60);
- SetScore(2000);
- SetMovePosition01(GetCenterX,120,5);
- LoadGraphic(imgBoss);
- LoadGraphic(cut);
- LoadGraphic(bg);
- LoadMusic(bgm);
- PlayMusic(bgm);
- CutIn(YOUMU,"Scripting like a Cirno - Easy -",cut,0,0,300,450);
- mainTask;
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,32);
- SetCollisionB(GetX,GetY,16);
- }
- @DrawLoop{
- SetTexture(imgBoss);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,110,110);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- 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(cut);
- DeleteGraphic(bg);
- }
- task mainTask{
- loop{ //this loop runs infinitely
- fire1; //starts at frame 0
- loop(1000){yield;} //waits 1000 frames, or almost 17 seconds
- fire2; //starts at frame 1000
- loop(1000){yield;} //waits 1000 frames
- fire3; //starts at frame 2000
- loop(1000){yield;} //waits 1000 frames
- } //once you're done, go back to the loop beginning
- }
- task fire1{
- CreateShot01(GetX, GetY, 3, angle, BLUE12, 0);
- CreateShot01(GetX, GetY, 3, -angle, RED12, 0);
- angle += 360/300;
- angle += angleAcc;
- angleAcc += 3;
- }
- task fire2{
- CreateShot01(GetX, GetY, 3, angle, BLUE12, 0);
- CreateShot01(GetX, GetY, 3, -angle, RED12, 0);
- angle += 360/300;
- angle += angleAcc;
- angleAcc += 0.3;
- }
- task fire3{
- CreateShot01(GetX, GetY, 3, angle, BLUE12, 0);
- CreateShot01(GetX, GetY, 3, -angle, RED12, 0);
- angle += 360/300;
- angle += angleAcc;
- angleAcc += 0.8;
- }
- function wait(w){
- loop(w){yield;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement