Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////FAIRY_ANIM.TXT (WORKS WITH THE ANIMATION LIBRARY FROM BLARGEL)\\\\\\\\\\\
- #include_function "script\enm\stage1\AnimationLib.txt"
- let ImgFairy = GetCurrentScriptDirectory ~ ".img\enemy.png";
- CreateAnimation("fairy_b", "idle", 1);
- SetAnimationFrame("fairy_b", "idle", 0, ImgFairy, 1, 4, 0, 42, 30);
- SetAnimationFrame("fairy_b", "idle", 0, ImgFairy, 1, 54, 0, 92, 30);
- SetAnimationFrame("fairy_b", "idle", 0, ImgFairy, 1, 104, 0, 142, 30);
- SetAnimationFrame("fairy_b", "idle", 0, ImgFairy, 1, 154, 0, 192, 30);
- CreateAnimation("fairy_b", "left", 1);
- SetAnimationFrame("fairy_b", "left", 0, ImgFairy, 1, 0, 128, 128, 256);
- CreateAnimation("fairy_b", "right", 1);
- SetAnimationFrame("fairy_b", "right", 0, ImgFairy, 1, 0, 256, 128, 384);
- CreateAnimation("fairy_b", "attack", 1);
- SetAnimationFrame("fairy_b", "attack", 0, ImgFairy, 1, 0, 384, 128, 512);
- ///////////02.txt (ENEMY SCRIPT) \\\\\\\\\\\\
- //Start Fairy. Shoots Semi-Aimed Danmaku
- script_enemy_main
- {
- let csd = GetCurrentScriptDirectory;
- let CustomShot = "\lib\Supershot\supershot.txt";
- //let Shot1 = csd ~ ".\enm1se\se_bigshot.wav";
- //let Shot2 = csd ~ ".\enm1se\se_bigshot.wav";
- let cx = GetCenterX; let cy = GetCenterY;
- let minx = GetClipMinX; let maxx = GetClipMaxX;
- let miny = GetClipMinY; let maxy = GetClipMaxY;
- let atp = GetAngleToPlayer;
- let count = 0;
- /////////////////////////////////////////////////
- @Initialize
- {
- /*** *** Declare Initial *** ***/
- SetLife(1);
- SetDamageRate(0, 0);
- SetScore(1000);
- MainTask;
- Animate("fairy_b", "idle", true);
- /*** *** Loading Data *** ***/
- LoadUserShotData(CustomShot);
- LoadGraphic(ImgFairy);
- }
- /////////////////////////////////////////////////
- @MainLoop
- {
- /*** *** Interaction Logic *** ***/
- SetCollisionA(GetX, GetY, 24);
- SetCollisionB(GetX, GetY, 12);
- yield;
- }
- /////////////////////////////////////////////////
- @DrawLoop
- {
- DrawAnimatedSprite("fairy_b", GetX, GetY);
- }
- /////////////////////////////////////////////////
- @Finalize
- {
- }
- /////////////////////////////////////////////////
- task MainTask
- {
- SetSpeed(1);
- SetAngle(0);
- }
- #include_function ".\Fairy_Anim.txt";
- }
- //////////////// Task_Stage.txt (Stage Script) \\\\\\\\\\\\\\
- #TouhouDanmakufu[Stage]
- #Title[Stage 1]
- #Text[None]
- #Player[player\Reimu\Hakurei.txt]
- #ScriptVersion[2]
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////
- script_stage_main
- {
- let csd = GetCurrentScriptDirectory;
- let StageBGM = GetCurrentScriptDirectory ~ ".\bgm\02.mp3";
- let BossBGM = GetCurrentScriptDirectory ~ ".\bgm\03.mp3";
- let BG1 = GetCurrentScriptDirectory ~ ".\world\stg1a.png";
- let BG2 = GetCurrentScriptDirectory ~ ".\world\stg1b.png";
- let BG3 = GetCurrentScriptDirectory ~ ".\world\stg1c.png";
- let ImgFairy = csd ~ ".enm\stage1\enemy\img\enemy.png";
- let Mid1 = GetCurrentScriptDirectory ~ ".\enm\stage1\Midboss_Plural_1.txt";
- let Mid2 = GetCurrentScriptDirectory ~ ".\enm\stage1\Midboss_Plural_2.txt";
- let Fairy1 = GetCurrentScriptDirectory ~ ".\enm\stage1\enemy\02.txt";
- let Fairy = [Fairy1];
- let bgscroll = 0;
- let a = 0;
- let angle = 0;
- let move0 = 0;
- let move1 = 0;
- let C_Value1 = 60;
- let C_Value2 = 80;
- let C_Value3 = 80;
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////
- @Initialize
- {
- SetCommonData("Difficulty", "Easy");
- LoadGraphic(BG1);
- LoadGraphic(BG2);
- LoadGraphic(BG3);
- LoadGraphic(ImgFairy);
- LoadMusic(StageBGM);
- LoadMusic(BossBGM);
- CompileEnemyFromFile(Fairy1);
- StageTask;
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////
- task StageTask
- {
- loop(90){yield}
- PlayMusic(StageBGM);
- CreateEnemyFromFile(Fairy1, GetClipMinX - 20, GetCenterY , 1, 0, 0);
- loop(500){yield}
- alternative(GetCommonData("Difficulty"))
- case("Easy"){CreateEnemyBossFromFile(Mid1,0,0,0,0,0);}
- case("Normal"){CreateEnemyBossFromFile(Mid1,0,0,0,0,0);}
- case("Hard"){CreateEnemyBossFromFile(Mid2,0,0,0,0,0);}
- case("Lunatic"){CreateEnemyBossFromFile(Mid2,0,0,0,0,0);}
- loop(60){yield}
- while(IsBossExisting){yield;}
- loop(60){C_Value1++; C_Value2-=0.33; C_Value3+=0.75; yield;}
- loop(300){yield}
- PlayMusic(BossBGM);
- //CreateEnemyBossFromFile(Boss[0],0,0,0,0,0);
- loop(60){yield}
- while(IsBossExisting){yield;}
- loop(5000){yield}
- Clear;
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////
- @MainLoop
- {
- bgscroll+=0.75;
- a++;
- move0++;
- yield;
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////
- @BackGround
- {
- WriteZBuffer(true);
- UseZBuffer(true);
- SetPerspectiveClip(100, 1500);
- SetFog(300, 600, C_Value1, C_Value2, C_Value3); //Green Mist, Pre-Midoss
- SetViewTo(0, 0, 0);
- SetViewFrom(900-move0, 70+move0/10*2, 55-move0/10);
- if(move0<100)
- {
- move1+=0.5;
- a+=2;
- }
- move0=100.0*sin(move1);
- SetTexture(BG1);
- SetGraphicRect(0, 0-a/2, 1000, 1000-a/2);
- SetGraphicAngle(130, 0, 0);
- DrawGraphic3D(0, 0, 0);
- SetTexture(BG1);
- SetGraphicRect(0, 0-a/2, 1000, 1000-a/2);
- SetGraphicAngle(80, 0, 0);
- DrawGraphic3D(0, 0, 0);
- SetTexture(BG2);
- SetGraphicRect(0, 0+a/2*1.2, 1000, 1000+a/2*1.2);
- SetGraphicAngle(300, 0, 0);
- SetAlpha(255);
- SetGraphicScale(1, 1);
- DrawGraphic3D(300, 200, 200);
- SetTexture(BG2);
- SetGraphicRect(0, 0+a/2*1.2, 1000, 1000+a/2*1.2);
- SetGraphicAngle(300, 0, 0);
- SetAlpha(255);
- SetGraphicScale(-1, 1);
- DrawGraphic3D(-300, 200, 200);
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////
- @Finalize
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement