//==========================================
//CutIn imitation script
// 
//	Types: 1 - MOF   Middle appear -> float to top -> leave top
//	       2 - SA    
//             3 - UFO	 Diagonal right top entrance -> slowmode -> follow path to leave
//	       4 - UFO2  Horizontal left entrance -> slowmode -> follow path to leave (Byakuren style)
//
// ==========================================================================================================

    let CSD = GetCurrentScriptDirectory;
    let cutinType = 0;
LoadSE(CSD ~"system\seUseSpellCard.wav");

    // cutin function
    task cutin(type,cutinImg,left,top,right,bottom){

	SetCommonData("boundL",left);
	SetCommonData("boundT",top);
	SetCommonData("boundR",right);
	SetCommonData("boundB",bottom);

	// type checker
	if(type=="KANAKO"){
		SetCommonData("cutinType",1);
		PlaySE(CSD ~"system\seUseSpellCard.wav");
		CreateEnemyFromFile(CSD ~"system\cutinFam.txt",GetClipMaxX+256,GetCenterY-100,0,0,cutinImg);
	}

	if(type=="NAZRIN"){
		PlaySE(CSD ~"system\seUseSpellCard.wav");
		SetCommonData("cutinType",3); 
		CreateEnemyFromFile(CSD ~"system\cutinFam.txt",GetClipMaxX+256,GetCenterY-100,0,0,cutinImg);
	}

	if(type=="BYAKUREN"){
		PlaySE(CSD ~"system\seUseSpellCard.wav");
		SetCommonData("cutinType",4); 
		CreateEnemyFromFile(CSD ~ "system\cutinFam.txt",GetClipMinX-256,GetCenterY,0,0,cutinImg);
	}
    }
    