Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task SpawnCrystals(object,speed){
- let moveXL = ObjMove_GetX(object);
- let moveYL = ObjMove_GetY(object);
- let moveXR = ObjMove_GetX(object);
- let moveYR = ObjMove_GetY(object);
- loop{
- if(moveXL>1){
- CreateShotA1(moveXL,0,rand(1,3),90,87,10);
- moveXL-=speed;
- }
- if(moveXR<(GetStgFrameWidth-1)){
- CreateShotA1(moveXR,0,rand(1,3),90,87,10);
- moveXR+=speed;
- }
- if(moveXR>(GetStgFrameWidth-1)){
- moveXR = GetStgFrameWidth;
- }
- if(moveXL<1){
- moveXL = 0;
- }
- if(moveXR==GetStgFrameWidth&&moveXL==0){
- break;
- }
- yield;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement