//Background
GRlightray=("\script\Images\3DBackground\Lightray.png");

BGsand=("\script\Images\3DBackground\Extra\Sand.png");
BGdunes1=("\script\Images\3DBackground\Extra\Dunes1.png");
BGdunes2=("\script\Images\3DBackground\Extra\Dunes2.png");
BGgrass1=("\script\Images\3DBackground\Extra\Grass1.png");
BGgrass2=("\script\Images\3DBackground\Extra\Grass2.png");
BGfence1=("\script\Images\3DBackground\Extra\Fence1.png");
BGsky=("\script\Images\3DBackground\Sky1.png");

BGwater1=("\script\Images\3DBackground\Extra\Water1.png");
BGwater2=("\script\Images\3DBackground\Extra\Water2.png");
BGwaves=("\script\Images\3DBackground\Extra\Waves.png");

BGfloor1=("\script\Images\3DBackground\Extra\Floor1.png");
BGfloor2=("\script\Images\3DBackground\Extra\Floor2.png");
BGfence2=("\script\Images\3DBackground\Extra\Fence2.png");
BGceiling=("\script\Images\3DBackground\Extra\Ceiling.png");

BGend=("\script\Images\3DBackground\Wall.png");

let i=0;
	loop(30){
	grassscroll1=grassscroll1~[0]; grass1=grass1~[0]; grassrandomx1=grassrandomx1~[0]; grassrandomx1[i]=randomgrass;
	i++;
	}
let i=0;
	loop(25){
	grassscroll2=grassscroll2~[0]; grass2=grass2~[0]; grassrandomx2=grassrandomx2~[0]; grassrandomx2[i]=randomgrass;
	i++;
	}

SetCommonData("InEvent",0);
SetCommonData("BackgroundStop",0);
SetCommonData("Stage",7);
SetCommonData("PlayMusic",1);

AddBomb(2);

bgphase=1;
hscroll=0; vscroll=0; scroll=0;
scrollon=1; scrollspeed=1;

oldscore=GetScore;

newviewx=0; newviewy=0; viewmovetimexy=5;
newviewh=0; newviewv=0; viewmovetimehv=5;
basev=100;

time=0; frame=0;
phase=0; stagephase=1;

CreateEnemyFromFile("script\Functions\fadein.txt",0,0,0,0,0);
CreateEnemyFromFile("script\Functions\itemline.txt",0,0,0,0,0);