Guest User

Untitled

a guest
Jul 11th, 2011
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1.  
  2. task fire{
  3.  
  4. loop{
  5. let firedelay=0;
  6. loop(45){
  7.  
  8. bullet(GetX+100,GetY,0,180,119,firedelay);
  9. shot(GetX-100,GetY,0,180,247,firedelay);
  10.  
  11. wait(7);
  12. firedelay=firedelay+7
  13. }
  14. wait(500);
  15. }
  16. }
  17.  
  18. task bullet(x,y,v,dir,graphic,delay){
  19.  
  20. let obj=Obj_Create(OBJ_SHOT);
  21.  
  22. let t = 0;
  23.  
  24. Obj_SetPosition(obj,x,y);
  25. Obj_SetSpeed(obj,v);
  26. Obj_SetAngle(obj,dir);
  27. ObjShot_SetGraphic(obj,graphic);
  28. ObjShot_SetDelay(obj,0);
  29. ObjShot_SetBombResist(obj,false);
  30.  
  31. while(!Obj_BeDeleted(obj)){
  32.  
  33. Obj_SetX(obj, x + 50*cos(90 + 6*t));
  34. Obj_SetY(obj, y + 50*sin(90 + 6*t));
  35.  
  36.  
  37.  
  38. if(t==600-delay){
  39.  
  40. Obj_SetPosition(obj,Obj_GetX(obj) + 2,Obj_GetY(obj) - 3);
  41.  
  42. }
  43.  
  44.  
  45. if(Obj_GetY(obj) < GetClipMinY) {
  46.  
  47. Obj_SetAngle(obj,360-dir);
  48.  
  49. }
  50.  
  51.  
  52. if(Obj_GetX(obj)==GetCenterX){
  53.  
  54.  
  55. Obj_SetPosition(obj,GetCenterX,GetCenterY-100);
  56.  
  57. }
  58.  
  59. t++;
  60.  
  61. yield;
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment