Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. task SpawnCrystals(object,speed){
  2. let moveXL = ObjMove_GetX(object);
  3. let moveYL = ObjMove_GetY(object);
  4. let moveXR = ObjMove_GetX(object);
  5. let moveYR = ObjMove_GetY(object);
  6. loop{
  7. if(moveXL>1){
  8. CreateShotA1(moveXL,0,rand(1,3),90,87,10);
  9. moveXL-=speed;
  10. }
  11. if(moveXR<(GetStgFrameWidth-1)){
  12. CreateShotA1(moveXR,0,rand(1,3),90,87,10);
  13. moveXR+=speed;
  14. }
  15. if(moveXR>(GetStgFrameWidth-1)){
  16. moveXR = GetStgFrameWidth;
  17. }
  18. if(moveXL<1){
  19. moveXL = 0;
  20. }
  21. if(moveXR==GetStgFrameWidth&&moveXL==0){
  22. break;
  23. }
  24.  
  25.  
  26. yield;}
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement