Guest User

effect object thing rtugiheorutighszoiuh

a guest
Jan 25th, 2013
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. #TouhouDanmakufu[Single]
  2. #Title[...]
  3. #Text[...]
  4. #Player[MARISA]
  5. #ScriptVersion[2]
  6.  
  7. script_enemy_main{
  8.  
  9. let D = GetCurrentScriptDirectory;
  10.  
  11. let imgBoss = D ~ "system\touhouchar1.png";
  12. let cut = D ~ "system\touhouchar2.png";
  13. let bg = D ~ "system\trees.png";
  14. let effect = D ~ "system\thing.png";
  15. @Initialize{
  16. SetLife(2500);
  17. SetTimer(60);
  18. SetScore(100000);
  19. LoadGraphic(imgBoss);
  20. LoadGraphic(cut);
  21. LoadGraphic(bg);
  22. LoadGraphic(effect);
  23. SetMovePosition02(GetCenterX, GetCenterY-96, 0);
  24.  
  25. CutIn(YOUMU,"...",cut,0,0,360,290);
  26.  
  27. mainTask;
  28. }
  29.  
  30. @MainLoop{
  31. SetCollisionA(GetX,GetY,32);
  32. SetCollisionB(GetX,GetY,16);
  33. yield;
  34. }
  35.  
  36. @DrawLoop{
  37. SetTexture(imgBoss);
  38. SetRenderState(ALPHA);
  39. SetAlpha(255);
  40. SetGraphicRect(0,0,110,110);
  41. SetGraphicScale(0.7,0.7);
  42. SetGraphicAngle(0,0,0);
  43. DrawGraphic(GetX,GetY);
  44. }
  45.  
  46. @BackGround{
  47. SetTexture(bg);
  48. SetRenderState(ALPHA);
  49. SetAlpha(255);
  50. SetGraphicRect(0,0,600,690);
  51. SetGraphicScale(1,1);
  52. SetGraphicAngle(0,0,0);
  53. DrawGraphic(GetCenterX,GetCenterY);
  54. }
  55.  
  56. @Finalize{
  57.  
  58. DeleteGraphic(imgBoss);
  59.  
  60. DeleteGraphic(cut);
  61.  
  62. DeleteGraphic(bg);
  63.  
  64. DeleteGraphic(effect);
  65.  
  66. }
  67.  
  68.  
  69. task mainTask{
  70.  
  71. fire;
  72.  
  73. effect;
  74. }
  75.  
  76. task fire{
  77. loop{
  78. let obj=Obj_Create(OBJ_SHOT);
  79.  
  80. Obj_SetPosition(obj, GetEnemyX, GetEnemyY);
  81.  
  82. Obj_SetAngle(obj, GetAngleToPlayer);
  83.  
  84. Obj_SetSpeed(obj, 2);
  85.  
  86. ObjShot_SetGraphic(obj, WHITE03);
  87.  
  88. ObjShot_SetDelay(obj, 0);
  89.  
  90. ObjShot_SetBombResist(obj, true);
  91. wait(45);
  92. yield;
  93. }
  94. }
  95.  
  96. task effect{
  97. let obj=Obj_Create(OBJ_EFFECT);
  98.  
  99.  
  100. let counter = 0;
  101.  
  102. ObjEffect_SetRenderState(obj,ALPHA);
  103. ObjEffect_SetTexture(obj,effect);
  104.  
  105. Obj_SetPosition(obj, GetEnemyX, GetEnemyY);
  106.  
  107. ObjEffect_SetScale(obj,1,1);
  108. ObjEffect_SetLayer(obj,5);
  109.  
  110. ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
  111. ObjEffect_CreateVertex(obj,4);
  112.  
  113. ObjEffect_SetVertexXY(obj, 0, -45, -44);
  114. ObjEffect_SetVertexXY(obj, 1, 45, -44);
  115. ObjEffect_SetVertexXY(obj, 2, -45, 44);
  116. ObjEffect_SetVertexXY(obj, 3, 45, 44);
  117.  
  118. ObjEffect_SetVertexUV(obj, 0, 0, 0);
  119. ObjEffect_SetVertexUV(obj, 1, 90, 0);
  120. ObjEffect_SetVertexUV(obj, 2, 0, 88);
  121. ObjEffect_SetVertexUV(obj, 3, 90, 88);
  122.  
  123. while(!Obj_BeDeleted(obj)) {
  124.  
  125. if(counter==120){ Obj_Delete(obj); }
  126. counter++;
  127. yield;
  128. }
  129. }
  130. function wait(w){loop(w){yield;}
  131.  
  132. }
  133. }
Advertisement
Add Comment
Please, Sign In to add comment