Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Single]
- #ScriptVersion[3]
- #Title["TEST"]
- #Text[""]
- #Background["./bg/BG_t.txt"]
- #include "./shot/bullet_lib.txt"
- #include "./eff/effects.txt"
- #include "./Cutin.h"
- #include "./lib_ev.txt"
- #include "./lib_sfx.txt"
- #include "./lib_misc.txt"
- #include "./lib_shot.txt"
- #include "./boss_render.txt"
- //*****
- //All custom functions in this single script are labeled
- //*****
- let Boss;
- let BossX = 0;
- let BossY = 0;
- let objScene = GetEnemyBossSceneObjectID();
- @Initialize {
- SetAutoDeleteObject(true);
- SetShotAutoDeleteClip(8,8,8,8);
- LoadEnemyShotData(dummypath);
- Boss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(Boss);
- ObjEnemy_SetDamageRate(Boss,0,0);
- ObjMove_SetPosition(Boss,GetStgFrameWidth()/2,130);
- EnemyHitSFX(Boss); //Sound effect for when the boss takes damage; defined in lib_sfx.txt
- SetCommonData("BossID","TAMAKO");
- mainTask;
- }
- @Event {
- alternative(GetEventType())
- case(EV_REQUEST_LIFE) {
- SetScriptResult(3000);
- }
- case(EV_REQUEST_TIMER) {
- SetScriptResult(60);
- }
- }
- @MainLoop {
- BossX = ObjMove_GetX(Boss);
- BossY = ObjMove_GetY(Boss);
- ObjEnemy_SetIntersectionCircleToShot(Boss,BossX,BossY,42);
- ObjEnemy_SetIntersectionCircleToPlayer(Boss,BossX,BossY,32);
- SetCommonData("BossX",ObjMove_GetX(Boss));
- SetCommonData("BossY",ObjMove_GetY(Boss));
- SetCommonData("BossMove",ObjMove_GetAngle(Boss));
- SetCommonData("BossSpeed",ObjMove_GetSpeed(Boss));
- yield;
- }
- @Finalize {
- }
- task mainTask {
- movement;
- TEnd;
- }
- task movement {
- wait(90);
- Obj_SetValue(Boss,"cast",1);
- soundControl(Boss,0,summonSFX,90);
- ascent(a in 1..4){
- ParticleCharge(Boss,90*a,rand(3.9,4.5),1,25,50,80,[192,88,36],[270,150]); //Particle charge effect; defined in effects.txt
- }
- ChargeEffect(Boss,3,10,3.6,54,[230,160,40]); //Shockwave charge effect; defined in effects.txt
- wait(130);
- renderBoss(objScene,Boss); //Rendering the boss' sprite; defined in boss_render.txt
- wait(30);
- ObjEnemy_SetDamageRate(Boss,45,25);
- Shot1;
- }
- task Shot1 {
- let angleS = angleToPlayer(Boss); //Angle from the boss object to the player object; defined in lib_misc.txt
- while(!Obj_IsDeleted(Boss)){
- ShotA1(angleS,-1,6,4,3);
- angleS += 11;
- wait(12);
- }
- task ShotA1(angle,offset,num1,num2,shotID){
- ascent(a in 0..num1){
- soundControl(Boss,0,bulletShot1SFX,40); //Custom task for playing sound effects; defined in lib_misc.txt
- loop(num2){
- let shot1A = CreateShotA1(BossX+48*cos(angle),BossY+48*sin(angle),3-a/num1,angle,shotID,12);
- angle += 360/num2;
- }
- angle += offset;
- }
- }
- }
- task TEnd {
- while(ObjEnemy_GetInfo(Boss,INFO_LIFE) > 0) {
- yield;
- }
- NotifyEventAll(EV_DELETE_BULLET,[BossX,BossY,40,2]); //Notification for the end of a single script, gradually deletes all bullets onscreen, going outward from the boss
- wait(15);
- Obj_Delete(Boss);
- wait(2);
- CloseScript(GetOwnScriptID);
- }
Advertisement
Add Comment
Please, Sign In to add comment