Jimbo16

Untitled

Feb 18th, 2016
114
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Plural]
  2. #ScriptVersion[3]
  3. #Title["Revenge"]
  4. #Text["F%#$ Chang'e"]
  5. #Background["script/Sandbox/Kanjuden Boss Rush/bg/BG.txt"]
  6.  
  7. #include "script/Sandbox/Kanjuden Boss Rush/eff/effects.txt"
  8.  
  9. let bossX = 0;
  10. let bossY = 0;
  11. let xpos = 0;
  12. let ypos = 0;
  13. let bossdir = 0;
  14. let obj = ObjEnemyBossScene_Create();
  15.  
  16. let circleimg = "script/Sandbox/Kanjuden Boss Rush/eff/eff_magicsquare.png";
  17.  
  18. @Initialize{
  19.     TPlural;
  20.     SetPlayerLife(45);
  21.     SetPlayerSpell(3);
  22.     MagicCircle_Plural(96);
  23. }
  24.  
  25. @Event{
  26.  
  27. }
  28.  
  29. @MainLoop{
  30.     xpos = GetCommonData("BossX",GetStgFrameWidth());
  31.     ypos = GetCommonData("BossY",130);
  32.     bossdir = GetCommonData("BossMove",0);
  33.     if(xpos>0){bossX = xpos;}
  34.     if(ypos>0){bossY = ypos;}
  35.    
  36.     yield;
  37. }
  38.  
  39. function wait(w) {
  40.     loop(w) { yield; }
  41. }
  42.  
  43. function MagicCircle_Create {
  44.     let circleobj = ObjPrim_Create(OBJ_SPRITE_3D);
  45.     ObjPrim_SetTexture(circleobj, circleimg);
  46.     ObjRender_SetBlendType(circleobj, BLEND_ALPHA );
  47.     //ObjSprite3D_SetSourceRect(circleobj, 0, 0, 256, 256 );
  48.     ObjSprite3D_SetSourceDestRect(circleobj, 0, 0, 256, 256 );
  49.     //ObjSprite3D_SetDestRect(circleobj, -256, -256, 0, 0);
  50.     //ObjRender_SetAngleX(circleobj, -30);
  51.     //ObjRender_SetScaleXYZ(circleobj, 1.4, 1.4, 0 );
  52.     return circleobj;
  53. }
  54.  
  55. task MagicCircle_Plural(delay) {
  56.     let circleobj = [MagicCircle_Create];
  57.     let scale = 0;
  58.     let scale1 = 1.4;
  59.     let scaleA = 0;
  60.     let angle = 0;
  61.     let angle1 = 3.6;
  62.     let speed = 0;
  63.     let speed1 = 0;
  64.     let speed2 = 0;
  65.     let speed3 = 0;
  66.     let alpha = 144;
  67.    
  68.    
  69.     loop(delay) {
  70.         ObjRender_SetScaleXYZ(circleobj[0], scale, scale, 0 );
  71.         Obj_SetRenderPriorityI(circleobj[0], 1 );
  72.         ObjRender_SetAlpha(circleobj[0], 0 );
  73.         yield;
  74.     }
  75.    
  76.     while(!Obj_IsDeleted(GetEnemyBossSceneObjectID())) {
  77.         ObjRender_SetAlpha(circleobj[0], alpha );
  78.         Obj_SetRenderPriorityI(circleobj[0], 32 );
  79.         ObjRender_SetPosition(circleobj[0],-bossX,-bossY,280);
  80.         if(scale<scale1) {
  81.             scale += scale1/28;
  82.             angle -= angle1;
  83.             angle1 += 0.02;
  84.             ObjRender_SetScaleXYZ(circleobj[0],scale,scale,0);
  85.             ObjRender_SetAngleXYZ(circleobj[0],25 - 25 * cos(speed),2 + 27 * sin(speed),angle);
  86.         }
  87.         //ObjRender_SetPosition(circleobj,ObjMove_GetX(enemyID),ObjMove_GetY(enemyID),0);
  88.         ObjRender_SetAngleXYZ(circleobj[0], -21 - 21 * cos(speed), 2 + 25 * sin(speed), angle - speed3*15 - speed*1.8 ); //Sets the angle and the rotation speed of the circle.
  89.         ObjRender_SetScaleXYZ(circleobj[0], scale1 - 0.1 * sin( speed*0 ), scale1 - 0.1 * sin( speed*0 ), 0 ); //Determines if the circle size changes while rotating. '0' means no change in size.
  90.         if( speed1 < 1 ){ speed2 += 2; }
  91.         speed1 = 1 * sin( speed2 );
  92.         if( scale1 < 1 ){ scaleA += 2; }
  93.         scale1 = 1 * sin( scaleA );
  94.         if( scale1 >= 1 && speed1 >= 1 ){ speed += 0.6; }
  95.        
  96.         if(ObjRender_GetAngleX(circleobj[0])==0 && ObjRender_GetAngleZ(circleobj[0])==0) {
  97.         ObjSprite3D_SetBillboard(circleobj[0],true);
  98.         }
  99.         else { ObjSprite3D_SetBillboard(circleobj[0],false); }
  100.        
  101.    
  102.         yield;
  103.     }
  104.     Obj_Delete(circleobj);
  105. }
  106.  
  107. task TPlural{
  108.  
  109.     let CSD=GetCurrentScriptDirectory();
  110.  
  111.     wait(20);
  112.     ObjEnemyBossScene_Add(obj,0,CSD~"Junko/nsp01.txt");
  113.     ObjEnemyBossScene_Add(obj,0,CSD~"Junko/sp01.txt");
  114.     ObjEnemyBossScene_Add(obj,1,CSD~"Junko/nsp02.txt");
  115.     ObjEnemyBossScene_LoadInThread(obj);
  116.     ObjEnemyBossScene_Regist(obj);
  117.     while(!Obj_IsDeleted(obj))
  118.     {
  119.         yield;
  120.     }
  121.     CloseScript(GetOwnScriptID());
  122. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×