Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Single]
- #ScriptVersion[3]
- #Title["Fluidmovement"]
- #Text["New"]
- #include "script/default_system/Default_ShotConst.txt"
- let objBoss;
- let objScene = GetEnemyBossSceneObjectID();
- @Event{
- alternative(GetEventType())
- case(EV_REQUEST_LIFE){
- SetScriptResult(500);
- }
- case(EV_REQUEST_TIMER){
- SetScriptResult(60);
- }
- case(EV_REQUEST_SPELL_SCORE){
- SetScriptResult(1000000);
- }
- }
- @Initialize{
- objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(objBoss);
- ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60);
- ObjEnemyBossScene_StartSpell(objScene);
- TDrawLoop;
- TFinalize;
- MainTask;
- }
- task TDrawLoop {
- let imgExRumia = GetCurrentScriptDirectory() ~ "ExRumia.png";
- ObjPrim_SetTexture(objBoss, imgExRumia);
- ObjSprite2D_SetSourceRect(objBoss, 64, 1, 127, 64);
- ObjSprite2D_SetDestCenter(objBoss);
- }
- @MainLoop{
- ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
- ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
- yield;
- }
- task MainTask{
- /*while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
- let angleT = GetAngleToPlayer(objBoss);
- CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 2, angleT, DS_BALL_S_RED, 5);
- wait(30);
- }*/
- //while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
- wait(120);
- loop(30){
- /*let angleT = 0;
- ascent(i in -2..2){
- ascent (j in 0..3) {
- //let obj = CreateStraightLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), GetAngleToPlayer(objBoss), 512, 20, 60, 153, 60);
- }
- }*/
- let angleT = 90;
- ascent(i in -1..2){
- ascent(j in 0..5){
- CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3 - j/6,
- angleT + i*15, DS_RICE_M_SKY, 1);
- }
- wait(20);
- }
- /*let angleT = 90;
- ascent(i in -9..10){*/
- //ascent (j in 0..5) {
- //CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3 - j/6, angleT + i*15, DS_RICE_M_SKY, 5);
- /*CreateLooseLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3,
- angleT + i*11.25,
- 100, 20, 52 + i, 0);*/
- //angleT += 360/13;
- //wait(30);
- //}
- // }
- }
- /* wait(120);
- //while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
- let angleT = 0;
- loop(30){
- ascent(i in -1..2){
- ascent(j in 0..3){
- CreateShotA1(ObjMove_GetX(objBoss) + 90*cos(angleT), ObjMove_GetY(objBoss) + 90*sin(angleT), 3 - j/6, angleT + i*15, DS_RICE_M_SKY, 5);
- }
- }
- angleT += 360/30
- }*/
- /*wait(120);
- movement;
- fireA;
- fireB;*/
- }
- task TFinalize {
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
- Obj_Delete(objBoss);
- DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
- SetAutoDeleteObject(true);
- CloseScript(GetOwnScriptID());
- return;
- if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
- +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
- AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
- }
- }
- task fireB{
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
- let angleT = GetAngleToPlayer(objBoss);
- loop(13){
- ascent(i in 0..5){
- CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 1.0 - i/9, angleT, DS_BALL_S_RED + i, 5);
- }
- angleT += 360/3;
- wait(30);
- }
- }
- }
- task fireA {
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
- let angleT = GetAngleToPlayer(objBoss);
- ascent(i in -1..2){
- ascent(j in 0..3){
- CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3 - j/6, angleT + i*15, DS_RICE_M_SKY, 5);
- }
- }
- wait(120)
- }
- }
- task movement{
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
- ObjMove_SetDestAtFrame(objBoss, rand(GetCenterX + 90, GetCenterX - 90), rand(GetCenterY - 60, GetCenterY - 120), 60);
- wait(240);
- }
- }
- function GetCenterX(){
- return GetStgFrameWidth() / 2;
- }
- function GetCenterY(){
- return GetStgFrameHeight() / 2;
- }
- function wait(n){
- loop(n){yield;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement