setViewportY(100);
setViewportX(-50);
if(isGlobalSet("loadscreen")==false){
setGlobal("loadscreen",true);
}
setGlobal("diecount",0);
setGlobal("level",12);
setGlobal("map",1);
setGlobal("message1","Max Power valiantly chases the remaining");
setGlobal("message2","'ambassador' towards their home planet");
setGlobal("message3","Blistopia.");
setGlobal("message4","");
setGlobal("asscount",0);
setGlobal("maxx",1408);
setGlobal("maxy",200);
if(getGlobal("loadscreen")==true){
changeMap(1,4);
}
int y=200;
int x=1000;
int s=0;
int i=0;
//Create Wormhole.
s=createSprite(22,13,0,128,0);
setLocal(s,"animate",0);
setLocal(s,"type","exit");
//Create Max Power's Ship.
s=createSprite(8,2,0,128,0);
setGlobal("playerx",0);
setGlobal("playery",200);
setZRotation(s,90);
createTimeStamp("animateship");
createTimeStamp("moveship");
createTimeStamp("shootrate");
setLocal(s,"anglecount",7);
setLocal(s,"storeangle",7);
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 some land mines.
i=0;
int ii=0;
x=0;
y=0;
//45
while(i<24){
if(i%4==0){
x=x+164;
if(ii%2==0){
y=0;
}else{
y=64;
}
ii=ii+1;
}else{
y=y+32;
}
s=createSprite(18,1,x,y,1);
int center=s;
setOffscreenProcessing(s,false);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"center",center);
setLocal(s,"explode",0);
setLocal(s,"health",20);
setLocal(s,"type","headmine");
s=createSprite(18,1,x-32,y,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"center",center);
setLocal(s,"explode",0);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x+32,y,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"center",center);
setLocal(s,"explode",0);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x-32,y-32,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"center",center);
setLocal(s,"explode",0);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x,y-32,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"explode",0);
setLocal(s,"center",center);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x+32,y-32,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"explode",0);
setLocal(s,"center",center);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x-32,y+32,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"explode",0);
setLocal(s,"center",center);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x,y+32,1);
setOffscreenProcessing(s,false);
setFrame(s,7);
setLocal(s,"explode",0);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"center",center);
setLocal(s,"type","mine");
setCollisionType(s,1);
s=createSprite(18,1,x+32,y+32,1);
setOffscreenProcessing(s,false);setFrame(s,7);
setLocal(s,"frame",0);
setLocal(s,"pulse",0);
setLocal(s,"explode",0);
setLocal(s,"center",center);
setLocal(s,"type","mine");
setCollisionType(s,1);
i=i+1;
}
s=createSprite(19,19,100,100,0);
setZRotation(s,90);
setLocal(s,"anglecount",6);
setLocal(s,"storeangle",6);
setLocal(s,"animate",0);
setLocal(s,"move",0);
setLocal(s,"health",40);
setLocal(s,"explode",0);
setLocal(s,"type","enemy");
setLocal(s,"life",0);
setLocal(s,"patrol",0);
setLocal(s,"lastshoot",0);
s=createSprite(22,22,950,100,1);
setLocal(s,"animate",0);
setLocal(s,"type","exit");
setGlobal("max",s);