if("400" < eval("ype" add a) or "330" < eval("xpe" add a) or eval("xpe" add a) < "10")
{
set("e" add a,"0");
}
set("xpe" add a,eval("xpe" add a) + eval("axe" add a));
set("ype" add a,eval("ype" add a) + eval("aye" add a));
setProperty("e" add a, _X, eval("xpe" add a));
setProperty("e" add a, _Y, eval("ype" add a));
a += "1";
}
if(shipx < getProperty("s", _X))
{
tellTarget("/s")
{
gotoAndPlay(6);
}
}
if(getProperty("s", _X) < shipx)
{
tellTarget("/s")
{
gotoAndPlay(3);
}
}
if(getProperty("s", _Y) < shipy)
{
tellTarget("/s/flame")
{
gotoAndPlay(2);
}
}
shipx = getProperty("s", _X);
shipy = getProperty("s", _Y);
if(getProperty("s", _X) < xpc1 + "20" and xpc1 - "20" < getProperty("s", _X) and getProperty("s", _Y) < ypc1 + "25" and ypc1 - "10" < getProperty("s", _Y))
{
c1 = "0";
tellTarget("/s/shield")
{
gotoAndPlay(2);
}
}
if(getProperty("s", _X) < xpc2 + "20" and xpc2 - "20" < getProperty("s", _X) and getProperty("s", _Y) < ypc2 + "25" and ypc2 - "10" < getProperty("s", _Y))
{
c2 = "0";
tellTarget("/s/shield")
{
gotoAndPlay(2);
}
}
if("25" < score)
{
level = "1";
}
if("150" < score)
{
level = "2";
}
if("400" < score)
{
level = "3";
}
if("20" >= shield)
{
setProperty("/alert", _visible, "1");
}
if("0" >= shield)
{
gotoAndPlay(7);
}
if(platon == "0")
{
ypp = - "800";
xpp = random("800") - random("400");
ypa = "2";
setProperty("/p1", _X, xpp);
platon = "1";
}
setProperty("/p1", _Y, ypp);
ypp += ypa;
if("700" + random("200") < ypp)
{
platon = "0";
}
if(platon2 == "0")
{
ypp2 = - "300";
xpp2 = random("800") - random("300");
ypa2 = "0.8";
setProperty("/p2", _X, xpp2);
platon2 = "1";
}
setProperty("/p2", _Y, ypp2);
ypp2 += ypa2;
if("800" + random("200") < ypp2)
{
platon2 = "0";
}
if(level >= "1")
{
if(fireon == "0" and "10" < ype1)
{
f1x = getProperty("e1", _X);
f1y = getProperty("e1", _Y);
f1xa = axe1;
f1ya = aye1 + "10";
fireon = "1";
setProperty("/f1", _X, f1x);
setProperty("/f1", _Y, f1y);
setProperty("/f1", _visible, "1");
tellTarget("/f1")
{
gotoAndPlay(2);
}
}
f1x += f1xa;
f1y += f1ya;
setProperty("/f1", _X, f1x);
setProperty("/f1", _Y, f1y);
if(getProperty("s", _X) < f1x + "25" and f1x - "25" < getProperty("s", _X) and getProperty("s", _Y) < f1y + "20" and f1y - "20" < getProperty("s", _Y))
{
tellTarget("/s/shield")
{
gotoAndPlay(2);
}
fireon = "0";
}
}
if(level >= "2")
{
if(fireon2 == "0" and "10" < ype2)
{
f2x = getProperty("e2", _X);
f2y = getProperty("e2", _Y);
f2xa = axe2 - random("20") + random("20");
f2ya = aye2 + "20";
fireon2 = "1";
setProperty("/f2", _X, f2x);
setProperty("/f2", _Y, f2y);
tellTarget("/f2")
{
gotoAndPlay(2);
}
}
f2x += f2xa;
f2y += f2ya;
setProperty("/f2", _X, f2x);
setProperty("/f2", _Y, f2y);
if(getProperty("s", _X) < f2x + "25" and f2x - "25" < getProperty("s", _X) and getProperty("s", _Y) < f2y + "10" and f2y - "10" < getProperty("s", _Y))
{
tellTarget("/s/shield")
{
gotoAndPlay(2);
}
fireon2 = "0";
}
}
if(level >= "3")
{
if(fireon3a == "0" and "10" < ype3)
{
f3ax = getProperty("e3", _X);
f3ay = getProperty("e3", _Y);
f3axa = axe1 + random("11") - random("11");
f3aya = aye1 + "10";
fireon3a = "1";
setProperty("/f3a", _X, f3ax);
setProperty("/f3a", _Y, f3ay);
setProperty("/f3a", _visible, "1");
tellTarget("/f3a")
{
gotoAndPlay(2);
}
}
f3ax += f3axa;
f3ay += f3aya;
setProperty("/f3a", _X, f3ax);
setProperty("/f3a", _Y, f3ay);
if(getProperty("s", _X) < f3ax + "25" and f3ax - "25" < getProperty("s", _X) and getProperty("s", _Y) < f3ay + "10" and f3ay - "10" < getProperty("s", _Y))
{
tellTarget("/s/shield")
{
gotoAndPlay(2);
}
fireon3a = "0";
}
if(fireon3b == "0" and "10" < ype3)
{
f3bx = getProperty("e3", _X);
f3by = getProperty("e3", _Y);
f3bxa = axe1 + random("11") - random("11");
f3bya = aye1 + "10";
fireon3b = "1";
setProperty("/f3b", _X, f3bx);
setProperty("/f3b", _Y, f3by);
setProperty("/f3b", _visible, "1");
tellTarget("/f3b")
{
gotoAndPlay(2);
}
}
f3bx += f3bxa;
f3by += f3bya;
setProperty("/f3b", _X, f3bx);
setProperty("/f3b", _Y, f3by);
if(getProperty("s", _X) < f3bx + "25" and f3bx - "25" < getProperty("s", _X) and getProperty("s", _Y) < f3by + "10" and f3by - "10" < getProperty("s", _Y))
{
tellTarget("/s/shield")
{
gotoAndPlay(2);
}
fireon3b = "0";
}
}
if(playerfire == "1" and ball2 == "0")
{
pf2x = getProperty("s", _X) - "10";
pf2y = getProperty("s", _Y);
pf2ya = - "40";
pf2xa = "0";
ball2 = "1";
setProperty("/pf2", _X, pf2x);
setProperty("/pf2", _Y, pf2y);
tellTarget("/pf2")
{
gotoAndPlay(2);
}
}
else if(playerfire == "1" and ball1 == "0")
{
pf1x = getProperty("s", _X) + "10";
pf1y = getProperty("s", _Y);
pf1ya = - "40";
pf1xa = "0";
ball1 = "1";
setProperty("/pf1", _X, pf1x);
setProperty("/pf1", _Y, pf1y);
tellTarget("/pf1")
{
gotoAndPlay(2);
}
}
else if(playerfire == "1" and ball3 == "0")
{
pf3x = getProperty("s", _X);
pf3y = getProperty("s", _Y);
pf3ya = - "40";
ball3 = "1";
setProperty("/pf3", _X, pf3x);
setProperty("/pf3", _Y, pf3y);
tellTarget("/pf3")
{
gotoAndPlay(2);
}
}
else if(playerfire == "1" and ball4 == "0")
{
pf4x = getProperty("s", _X);
pf4y = getProperty("s", _Y) - "40";
pf4ya = - "1";
ball4 = "1";
setProperty("/pf4", _X, pf4x);
setProperty("/pf4", _Y, pf4y);
tellTarget("/pf4")
{
gotoAndPlay(2);
}
}
if(ball2 == "1")
{
pf2y += pf2ya;
setProperty("/pf2", _Y, pf2y);
pf2x += pf2xa;
setProperty("/pf2", _X, pf2x);
if(c1 == "1" and getProperty("c1", _X) < pf2x + "30" and pf2x - "30" < getProperty("c1", _X) and getProperty("c1", _Y) < pf2y + "30" and pf2y - "30" < getProperty("c1", _Y))
{
ball2 = "0";
tellTarget("/pf2")
{
gotoAndStop(1);
}
tellTarget("/c1")
{
gotoAndPlay(2);
}
}
if(c2 == "1" and getProperty("c2", _X) < pf2x + "30" and pf2x - "30" < getProperty("c2", _X) and getProperty("c2", _Y) < pf2y + "30" and pf2y - "30" < getProperty("c2", _Y))
{
ball2 = "0";
tellTarget("/pf2")
{
gotoAndStop(1);
}
tellTarget("/c2")
{
gotoAndPlay(2);
}
}
a = "1";
while(eval("/:level") >= a)
{
if(eval("e" add a) == "1" and getProperty("e" add a, _X) < pf2x + "30" and pf2x - "30" < getProperty("e" add a, _X) and getProperty("e" add a, _Y) < pf2y + "30" and pf2y - "30" < getProperty("e" add a, _Y))
{
ball2 = "0";
tellTarget("/e" add a)
{
gotoAndPlay(2);
}
}
a += "1";
}
}
if(ball1 == "1")
{
pf1y += pf1ya;
setProperty("/pf1", _Y, pf1y);
pf1x += pf1xa;
setProperty("/pf1", _X, pf1x);
if(c1 == "1" and getProperty("c1", _X) < pf1x + "30" and pf1x - "30" < getProperty("c1", _X) and getProperty("c1", _Y) < pf1y + "30" and pf1y - "30" < getProperty("c1", _Y))
{
ball1 = "0";
tellTarget("/pf1")
{
gotoAndStop(1);
}
tellTarget("/c1")
{
gotoAndPlay(2);
}
}
if(c2 == "1" and getProperty("c2", _X) < pf1x + "30" and pf1x - "30" < getProperty("c2", _X) and getProperty("c2", _Y) < pf1y + "30" and pf1y - "30" < getProperty("c2", _Y))
{
ball1 = "0";
tellTarget("/pf1")
{
gotoAndStop(1);
}
tellTarget("/c2")
{
gotoAndPlay(2);
}
}
a = "1";
while(eval("/:level") >= a)
{
if(eval("e" add a) == "1" and getProperty("e" add a, _X) < pf1x + "30" and pf1x - "30" < getProperty("e" add a, _X) and getProperty("e" add a, _Y) < pf1y + "30" and pf1y - "30" < getProperty("e" add a, _Y))
{
ball1 = "0";
tellTarget("/e" add a)
{
gotoAndPlay(2);
}
}
a += "1";
}
}
if(ball3 == "1")
{
pf3y += pf3ya;
setProperty("/pf3", _Y, pf3y);
if(c1 == "1" and getProperty("c1", _X) < pf3x + "30" and pf3x - "30" < getProperty("c1", _X) and getProperty("c1", _Y) < pf3y + "30" and pf3y - "30" < getProperty("c1", _Y))
{
ball3 = "0";
tellTarget("/pf3")
{
gotoAndStop(1);
}
tellTarget("/c1")
{
gotoAndPlay(2);
}
}
if(c2 == "1" and getProperty("c2", _X) < pf3x + "30" and pf3x - "30" < getProperty("c2", _X) and getProperty("c2", _Y) < pf3y + "30" and pf3y - "30" < getProperty("c2", _Y))
{
ball3 = "0";
tellTarget("/pf3")
{
gotoAndStop(1);
}
tellTarget("/c2")
{
gotoAndPlay(2);
}
}
a = "1";
while(eval("/:level") >= a)
{
if(eval("e" add a) == "1" and getProperty("e" add a, _X) < pf3x + "30" and pf3x - "30" < getProperty("e" add a, _X) and getProperty("e" add a, _Y) < pf3y + "30" and pf3y - "30" < getProperty("e" add a, _Y))
{
ball3 = "0";
tellTarget("/e" add a)
{
gotoAndPlay(2);
}
}
a += "1";
}
}
if(ball4 == "1")
{
pf4y += pf4ya;
setProperty("/pf4", _Y, pf4y);
pf4ya -= "3";
if(c1 == "1" and getProperty("c1", _X) < pf4x + "30" and pf4x - "30" < getProperty("c1", _X) and getProperty("c1", _Y) < pf4y + "30" and pf4y - "30" < getProperty("c1", _Y))
{
ball4 = "0";
tellTarget("/pf4")
{
gotoAndStop(1);
}
tellTarget("/c1")
{
gotoAndPlay(2);
}
}
if(c2 == "1" and getProperty("c2", _X) < pf4x + "30" and pf4x - "30" < getProperty("c2", _X) and getProperty("c2", _Y) < pf4y + "30" and pf4y - "30" < getProperty("c2", _Y))
{
ball4 = "0";
tellTarget("/pf4")
{
gotoAndStop(1);
}
tellTarget("/c2")
{
gotoAndPlay(2);
}
}
a = "1";
while(eval("/:level") >= a)
{
if(eval("e" add a) == "1" and getProperty("e" add a, _X) < pf4x + "35" and pf4x - "35" < getProperty("e" add a, _X) and getProperty("e" add a, _Y) < pf4y + "30" and pf4y - "30" < getProperty("e" add a, _Y))