
	SetCameraRadius(600);
	SetCameraElevationAngle(0);
	SetCameraAzimuthAngle(-0);
	SetCameraFocusXYZ(0, -67, -200);

	//SetFogParam(1000, 2000, 0, 0, 0);

	Sky;
	Clouds;
	ascent(let pos in 0..4)
	{
		Pillars(pos);
	}

task Sky{
	let count = 0;
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	Obj_SetRenderPriorityI(obj,20);
	ObjPrim_SetTexture(obj, GetCurrentScriptDirectory~"img/stg6bg.png");
	ObjSprite2D_SetSourceRect(obj,0,0,512,512);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,1,1,1);
	ObjRender_SetBlendType(obj,BLEND_ALPHA);
	ObjRender_SetColor(obj,255,255,255);
	ObjRender_SetPosition(obj,384/2,448/2+32,0);
	loop{
	count++;
	yield;
	}
}

task Clouds{
	let count = 0;
	let obj=ObjPrim_Create(OBJ_SPRITE_2D);
	Obj_SetRenderPriorityI(obj,20);
	ObjPrim_SetTexture(obj, GetCurrentScriptDirectory~"img/stg6bg5.png");
	ObjSprite2D_SetSourceRect(obj,0,0,256,256);
	ObjSprite2D_SetDestCenter(obj);
	ObjRender_SetScaleXYZ(obj,2,2,1);
	ObjRender_SetBlendType(obj,BLEND_ADD_ARGB);
	ObjRender_SetColor(obj,255,255,255);
	ObjRender_SetPosition(obj,384/2,448/2+32,0);
	loop{
	ObjSprite2D_SetSourceRect(obj,count,0,256+count,256);
	count+=0.2;
	yield;
	}
}


task Pillars(pos){
	let z = (pos-1) * 400;
	let path = GetCurrentScriptDirectory~"img/model.mqo";
	let obj = ObjMesh_Create();
	ObjMesh_Load(obj, path);
	Obj_SetRenderPriorityI(obj, 20);

	let frameInvisible = 0;
	loop
	{
	
		ObjRender_SetZ(obj, z);
		z+=0.2;
		if(z > 400){z -= 400*4;}

		yield;
	}
}