Guest User

h

a guest
Aug 20th, 2011
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. task TSpell
  2. {
  3. SetPlayerInvincibilityFrame(300);
  4. let objManage = GetSpellManageObject();
  5. let spellgraphic = GetCurrentScriptDirectory~"marisa_bomb_a.png";
  6.  
  7. let angle = 0;
  8. loop(3)
  9. {
  10. Spiral(angle, 15);
  11. angle+=120;
  12. }
  13. loop(220)
  14. {
  15. yield;
  16. }
  17. Obj_Delete(objManage);
  18.  
  19. task Spiral(angle, a)
  20. {
  21. let dist = 0;
  22. let x = (GetStgFrameWidth/2)+dist*cos(angle);
  23. let y = (GetStgFrameHeight/2)+dist*sin(angle);
  24. let frame = 0;
  25. while(!IsOffScreen(x, y))
  26. {
  27. x = (GetStgFrameWidth/2)+dist*cos(angle);
  28. y = (GetStgFrameHeight/2)+dist*sin(angle);
  29. if(frame%5==0 && frame > 0)
  30. {
  31. Star(x, y);
  32. }
  33. dist+=5;
  34. angle+=a;
  35. frame++;
  36. }
  37. }
  38.  
  39. task Star(x, y)
  40. {
  41. let obj = ObjSpell_Create();
  42. ObjSpell_SetEraseShot(obj, true);
  43. ObjSpell_SetDamage(obj, 10);
  44. ObjPrim_SetVertexCount(obj, 4);
  45. ObjPrim_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
  46. ObjPrim_SetTexture(obj, spellgraphic);
  47. ObjPrim_SetVertexUV(obj, 0, 0.0, 0.0);
  48. ObjPrim_SetVertexUV(obj, 1, 1.0, 0.0);
  49. ObjPrim_SetVertexUV(obj, 2, 0.0, 1.0);
  50. ObjPrim_SetVertexUV(obj, 3, 1.0, 1.0);
  51. ObjRender_SetPosition(obj, x, y, 0);
  52. ObjSpell_SetIntersectionCircle(obj, x, y, 10);
  53. ObjPrim_SetVertexPosition(obj, 0, x-50, y-50, 0);
  54. ObjPrim_SetVertexPosition(obj, 1, x+50, y-50, 0);
  55. ObjPrim_SetVertexPosition(obj, 2, x-50, y+50, 0);
  56. ObjPrim_SetVertexPosition(obj, 3, x+50, y+50, 0);
  57. ObjSpell_Regist(obj);
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment