script_enemy_main{

let sidepos=500;
let toppos=-100;
let sidebar=0;
let topbar=0;
let fade=255;

let time=0;
let EFsidebar=("\script\Images\OtherEffects\DescriptionL1.png");
let EFtopbar=("\script\Images\OtherEffects\BarL1.png");
let miny=GetClipMinY; let maxy=GetClipMaxY; let minx=GetClipMinX; let maxx=GetClipMaxX;
let cx=GetCenterX; let cy=GetCenterY;

@Initialize{
	LoadGraphic("\script\Images\OtherEffects\Description1.png");
	LoadGraphic("\script\Images\OtherEffects\Description2.png");
	LoadGraphic("\script\Images\OtherEffects\Description3.png");
	LoadGraphic("\script\Images\OtherEffects\Description4.png");
	LoadGraphic("\script\Images\OtherEffects\Description5.png");
	LoadGraphic("\script\Images\OtherEffects\Description6.png");
	LoadGraphic("\script\Images\OtherEffects\Description7.png");

	LoadGraphic("\script\Images\OtherEffects\Bar1.png");
	LoadGraphic("\script\Images\OtherEffects\Bar2.png");
	LoadGraphic("\script\Images\OtherEffects\Bar3.png");
	LoadGraphic("\script\Images\OtherEffects\Bar4.png");
	LoadGraphic("\script\Images\OtherEffects\Bar5.png");
	LoadGraphic("\script\Images\OtherEffects\Bar6.png");
	LoadGraphic("\script\Images\OtherEffects\Bar7.png");

	SetLife(1);
}

@MainLoop{

if(GetArgument==1){
EFsidebar=("\script\Images\OtherEffects\Description1.png");
EFtopbar=("\script\Images\OtherEffects\Bar1.png");

}
if(GetArgument==2){
EFsidebar=("\script\Images\OtherEffects\Description2.png");
EFtopbar=("\script\Images\OtherEffects\Bar2.png");
}
if(GetArgument==3){
EFsidebar=("\script\Images\OtherEffects\Description3.png");
EFtopbar=("\script\Images\OtherEffects\Bar3.png");

}
if(GetArgument==4){
EFsidebar=("\script\Images\OtherEffects\Description4.png");
EFtopbar=("\script\Images\OtherEffects\Bar4.png");
}
if(GetArgument==5){
EFsidebar=("\script\Images\OtherEffects\Description5.png");
EFtopbar=("\script\Images\OtherEffects\Bar5.png");

}
if(GetArgument==6){
EFsidebar=("\script\Images\OtherEffects\Description6.png");
EFtopbar=("\script\Images\OtherEffects\Bar6.png");
}
if(GetArgument==7){
EFsidebar=("\script\Images\OtherEffects\Description7.png");
EFtopbar=("\script\Images\OtherEffects\Bar7.png");

}


if(time==0){
topbar=(Obj_Create(OBJ_EFFECT)); Obj_SetPosition(topbar,cx,sidepos); ObjEffect_SetLayer(topbar,7); ObjEffect_SetTexture(topbar,EFtopbar);
ObjEffect_SetPrimitiveType(topbar,PRIMITIVE_TRIANGLESTRIP); ObjEffect_CreateVertex(topbar,4);
ObjEffect_SetVertexXY(topbar,0,-192,-40); ObjEffect_SetVertexUV(topbar,0,0,0);
ObjEffect_SetVertexXY(topbar,1,192,-40); ObjEffect_SetVertexUV(topbar,1,384,0);
ObjEffect_SetVertexXY(topbar,2,-192,40); ObjEffect_SetVertexUV(topbar,2,0,80);
ObjEffect_SetVertexXY(topbar,3,192,40); ObjEffect_SetVertexUV(topbar,3,384,80);

sidebar=(Obj_Create(OBJ_EFFECT)); Obj_SetPosition(sidebar,toppos,cy); ObjEffect_SetLayer(sidebar,7); ObjEffect_SetTexture(sidebar,EFsidebar);
ObjEffect_SetPrimitiveType(sidebar,PRIMITIVE_TRIANGLESTRIP); ObjEffect_CreateVertex(sidebar,4);
ObjEffect_SetVertexXY(sidebar,0,-75,-224); ObjEffect_SetVertexUV(sidebar,0,0,0);
ObjEffect_SetVertexXY(sidebar,1,75,-224); ObjEffect_SetVertexUV(sidebar,1,150,0);
ObjEffect_SetVertexXY(sidebar,2,-75,224); ObjEffect_SetVertexUV(sidebar,2,0,448);
ObjEffect_SetVertexXY(sidebar,3,75,224); ObjEffect_SetVertexUV(sidebar,3,150,448);
}

if(time>=0 && sidepos>340){ Obj_SetPosition(sidebar,sidepos,cy); sidepos-=1.5; }
if(time>=0 && toppos<65){ Obj_SetPosition(topbar,cx,toppos); toppos+=1; }

if(time>=300){
	ObjEffect_SetVertexColor(sidebar,0,fade,255,255,255); ObjEffect_SetVertexColor(sidebar,1,fade,255,255,255);
	ObjEffect_SetVertexColor(sidebar,2,fade,255,255,255); ObjEffect_SetVertexColor(sidebar,3,fade,255,255,255);
	ObjEffect_SetVertexColor(topbar,0,fade,255,255,255); ObjEffect_SetVertexColor(topbar,1,fade,255,255,255);
	ObjEffect_SetVertexColor(topbar,2,fade,255,255,255); ObjEffect_SetVertexColor(topbar,3,fade,255,255,255);
if(fade>0){ fade-=5; }
}

if(time==400){ Obj_Delete(topbar); Obj_Delete(sidebar); }

time++;
}

}