Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #ScriptVersion[3]
- #Title["Shotsheet Test"]
- #Text[""]
- #include ".\Var_Shot.txt"
- let CSD = GetCurrentScriptDirectory;
- let objBoss;
- let bossX;
- let bossY;
- let CenterX = GetStgFrameWidth/2;
- let CenterY = GetStgFrameHeight/2;
- let Finish = false;
- let ID = 1;
- @Initialize{
- objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(objBoss);
- ObjMove_SetPosition(objBoss,CenterX,CenterY);
- TMain;
- }
- @Event{
- alternative(GetEventType)
- case(EV_REQUEST_LIFE){ SetScriptResult(1000);}
- }
- @MainLoop{
- bossX = ObjMove_GetX(objBoss);
- bossY = ObjMove_GetY(objBoss);
- ObjEnemy_SetIntersectionCircleToShot(objBoss,bossX,bossY,24);
- ObjEnemy_SetIntersectionCircleToPlayer(objBoss,bossX,bossY,24);
- if(ObjEnemy_GetInfo(objBoss,INFO_LIFE)<=0){
- Obj_Delete(objBoss);
- CloseScript(GetOwnScriptID);
- return;
- }
- yield;
- }
- @Finalize{
- }
- task TMain{
- wait(60);
- TLaser;
- loop{
- if(Finish){
- TShot;
- break;
- }
- yield;
- }
- loop{
- if(ID==417){
- wait(240);
- Obj_Delete(objBoss);
- CloseScript(GetOwnScriptID);
- }
- }
- }
- task TLaser{
- TFireSL(ID);
- wait(2400);
- ID+=16;
- TFireSL(ID);
- wait(2400);
- Finish = true;
- }
- task TShot{
- while(ID<=417){
- TFireS(ID);
- ID+=16;
- wait(360);
- }
- }
- task TFireSL(let ShotVar){
- ascent(i in 0..16){
- CreateStraightLaserA1(bossX,bossY,i*22.5,600,20,300,ST_LASER_RED,120); //I'm using two different methods here and in the next task to demonstrate what I tried so far.
- wait(120);
- }
- }
- task TFireS(let ShotVar){
- loop(10){
- ascent(i in 0..16){
- CreateShotA1(bossX,bossY,1,i*22.5,i+ShotVar,30);
- }
- wait(30);
- }
- }
- function wait(w){ loop(w){ yield;}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement