setGlobal("maxx",1408);
setGlobal("maxy",736);
int y=200;
int x=1000;
int s=0;
int i=0;
//Create Max Power's Ship.
s=createSprite(8,2,200,200,0);
setZRotation(s,90);
setViewportX(100);
setViewportY(100);
setGlobal("playerx",200);
setGlobal("playery",200);
createTimeStamp("animateship");
createTimeStamp("moveship");
createTimeStamp("shootrate");
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"explode",0);
setLocal(s,"type","player");
setLocal(s,"life",0);
setGlobal("shiphealth",100);
//CREATE THE EXIT STRATEGY.
if(isGlobalSet("score")==false)
setGlobal("score",0);
if(isGlobalSet("ships")==false)
setGlobal("ships",5);
setGlobal("fade",1);
setGlobal("fadecount",255);
setGlobal("objective",0);
//Create enemy ships.
s=createSprite(19,10,200-64,200,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200,200-64,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200-64,200-64,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200+64,200,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200,200+64,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200+64,200+64,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200-32,200,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200,200-32,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200-32,200-32,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200+32,200,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200,200+32,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(19,10,200+32,200+32,1);
setLocal(s,"anglecount",5);
setLocal(s,"storeangle",5);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",400);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
setGlobal("max",s);