Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task fire{
- loop{
- let firedelay=0;
- loop(45){
- bullet(GetX+100,GetY,0,180,119,firedelay);
- shot(GetX-100,GetY,0,180,247,firedelay);
- wait(7);
- firedelay=firedelay+7
- }
- wait(500);
- }
- }
- task bullet(x,y,v,dir,graphic,delay){
- let obj=Obj_Create(OBJ_SHOT);
- let t = 0;
- Obj_SetPosition(obj,x,y);
- Obj_SetSpeed(obj,v);
- Obj_SetAngle(obj,dir);
- ObjShot_SetGraphic(obj,graphic);
- ObjShot_SetDelay(obj,0);
- ObjShot_SetBombResist(obj,false);
- while(!Obj_BeDeleted(obj)){
- Obj_SetX(obj, x + 50*cos(90 + 6*t));
- Obj_SetY(obj, y + 50*sin(90 + 6*t));
- if(t==600-delay){
- Obj_SetPosition(obj,Obj_GetX(obj) + 2,Obj_GetY(obj) - 3);
- }
- if(Obj_GetY(obj) < GetClipMinY) {
- Obj_SetAngle(obj,360-dir);
- }
- if(Obj_GetX(obj)==GetCenterX){
- Obj_SetPosition(obj,GetCenterX,GetCenterY-100);
- }
- t++;
- yield;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment