Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Fire wedge of bullets, like Seiran
- //e.g. FireWedgeA1(ex,ey,ang,2,620,5, 10,6,5, 20,10);
- function FireWedgeA1(x,y,ang,spd,type,del, rows,rowgap,rowdel, dist,distdel) {
- let dummy = CreateDummyShot(0,0);
- Obj_SetValue(dummy,"Shots",[]); //reference to the list of shots
- Obj_SetValue(dummy,"IsNewShots",-1); //index of first shot created since it was reset
- TWedge;
- return dummy;
- task TWedge {
- let s; let a;
- let shot;
- let dx = rowgap*cos(ang); let dy = rowgap*sin(ang);
- let tx = x + dist*cos(ang); let ty = y + dist*sin(ang);
- let tx2; let ty2;
- ascent(i in 0..rows) {
- a = -rowgap*i/2;
- if(Obj_GetValueD(dummy,"IsNewShots",-1)<0){Obj_SetValue( dummy,"IsNewShots", length(Obj_GetValue(dummy,"Shots"))-0 ); }
- ascent(j in 0..i) {
- //s = wedgespd(spd,ang,a);
- shot = CreateShotA1(x,y,0,ang+a, type, del);
- tx2 = tx + a * cos(ang+90); ty2 = ty + a * sin(ang+90);
- ObjMove_SetDestAtFrame(shot,tx2,ty2,distdel);
- ObjMove_AddPatternA1(shot,distdel,spd,ang);
- a+=rowgap;
- Obj_SetValue(dummy,"Shots",Obj_GetValue(dummy,"Shots")~[shot]);
- }
- wait(rowdel);
- }
- wait(120);
- Obj_Delete(dummy);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement