Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Single]
- #ScriptVersion[3]
- #Title["Shingeki no Ellen"]
- #Text["Ellen a repere quelqu'un un peu trop enclin a parler anglais. Cette personne est Reimu. Saura-t-elle empecher Ellen Catablor de lui faire gouter a son pouvoir du goulag eternel ?"]
- let bossObj;
- let bossX = 0;
- let bossY = 0;
- let animFrame = 0;
- let animFrame2 = 0;
- let imgBoss = GetCurrentScriptDirectory ~ "jojolen.png";
- let bg = GetCurrentScriptDirectory ~ "shitlen.png";
- #include"script/default_system/ZUNShot_Const.txt"
- #include"script/default_system/Default_Effect.txt"
- #include"script/default_system/Default_ShotConst.txt"
- @Initialize {
- let objScene = GetEnemyBossSceneObjectID();
- ObjEnemyBossScene_StartSpell(objScene);
- // define a boss in bossObj and register it
- bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(bossObj);
- // warp boss to this location when initialized.
- ObjMove_SetPosition(bossObj,300,300);
- LoadSound(GetCurrentScriptDirectory ~ "ellen.mp3");
- PlayBGM(GetCurrentScriptDirectory ~ "ellen.mp3",0,384);
- // move boss to desired x y location at desired speed
- ObjMove_SetDestAtSpeed(bossObj,192,120,5);
- mainTask; // run mainTask
- }
- @Event {
- // setting the boss timer and life
- alternative(GetEventType())
- case(EV_REQUEST_LIFE) {
- SetScriptResult(10000);
- }
- case(EV_REQUEST_TIMER) {
- SetScriptResult(600);
- }
- case(EV_REQUEST_SPELL_SCORE) {
- SetScriptResult(30000);
- }
- }
- @MainLoop {
- bossX = ObjMove_GetX(bossObj);
- bossY = ObjMove_GetY(bossObj);
- // collision for shot and player
- ObjEnemy_SetIntersectionCircleToShot(bossObj,bossX,bossY,35);
- ObjEnemy_SetIntersectionCircleToPlayer(bossObj,bossX,bossY,35);
- yield;
- }
- @Finalize { }
- // your best friend, forever.
- function wait(w) { loop(w) { yield; } }
- task mainTask {
- renderBoss;
- renderBG;
- movement;
- TEnd;
- }
- task renderBG {
- let obj = ObjPrim_Create(OBJ_SPRITE_2D);
- Obj_SetRenderPriorityI(obj,21);
- ObjPrim_SetTexture(obj,bg);
- ObjSprite2D_SetSourceRect(obj,0,0,475,475);
- ObjSprite2D_SetDestRect(obj,0,0,GetStgFrameWidth,GetStgFrameHeight);
- }
- task renderBoss {
- let dir;
- let speed;
- // texture the boss, set centre as true centre.
- ObjPrim_SetTexture(bossObj,imgBoss);
- ObjSprite2D_SetSourceRect(bossObj,0,0,193,217);
- ObjSprite2D_SetDestCenter(bossObj);
- ObjRender_SetScaleXYZ(bossObj,1.0,1.0,0);
- task movement {
- wait(60);
- while(!Obj_IsDeleted(bossObj)) {
- fire;
- wait(30);
- yield;
- }
- }
- task fire {
- let radius = 32;
- let direction = 0;
- let numberOfBullets = 36;
- loop(numberOfBullets) {
- CreateShotA1(bossX+radius*cos(direction),bossY+radius*sin(direction),5,direction,54,0);
- CreateShotA1(bossX+radius*cos(direction),bossY+radius*sin(direction),5,direction,156,30);
- direction += 360/numberOfBullets;
- }
- loop(60) { yield; }
- }
- task TEnd
- {
- while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0) {
- yield;
- }
- TExplosionA(bossX,bossY,10,0.5);
- Obj_Delete(bossObj);
- DeleteShotAll(TYPE_ALL, TYPE_ITEM);
- wait(30);
- CloseScript(GetOwnScriptID());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement