//---------------------------------------------------------------------------------------------
//
//	Chromatic Wing Mod
//	
//	Mr. Blargel's CreateEnemyWave function
//	Originally from Patchouli's Extra Stage
//	Add SF_ prefix to prevent variable conflict
//
//---------------------------------------------------------------------------------------------


/***************************************************************************************************************
** Function: CreateEnemyWave
** Paramaters:	SF_len <integer> -- Length of the list (how many different types of enemy do you have?)
** 		SF_enemyType <string[]> -- array contains enemy types for individual wave
**		SF_startX <integer[]> -- a list represents starting X positions for the first enemy
**		SF_startY <integer[]> -- a list represents starting Y positions for the first enemy
**		SF_incrementX <integer[]> -- a list represents distance increase of the next enemy to clone in X-axis
**		SF_incrementY <integer[]> -- a list represents  distance increase of the next enemy to clone in Y-axis
**		SF_cloneCount <integer[]> -- a list represents number of enemies you want to clone
**		SF_frameDelay <integer[]> -- a list represents number of frames to delay before next wave
**		SF_cloneDelay <integer[]> -- a list represents number of frames to delay in between clone creation
**
**		Add
**		SF_argument <integer[]> -- some argument to make their behavior diffirent from each other
**
** Usage:	This function creates a wave of enemies based on the values given above.
****************************************************************************************************************/
		function CreateEnemyWave(let SF_len, let SF_enemyType, let SF_startX, let SF_startY, let SF_incrementX,
			let SF_incrementY, let SF_cloneCount, let SF_frameDelay, let SF_cloneDelay, let SF_argument)
		{

			Wait(SF_frameDelay[0]);
			ascent(let i in 0..SF_cloneCount[0])
			{
				CreateEnemyFromFile(GetCurrentScriptDirectory~SF_enemyType[0],
						SF_startX[0]+i*SF_incrementX[0],
						SF_startY[0]+i*SF_incrementY[0],
						0,0,SF_argument[0]);

				Wait(SF_cloneDelay[0]);
			}


			SF_enemyType	= SF_enemyType[1..SF_len];
			SF_startX	= SF_startX[1..SF_len];
			SF_startY		= SF_startY[1..SF_len];
			SF_incrementX	= SF_incrementX[1..SF_len];
			SF_incrementY	= SF_incrementY[1..SF_len];
			SF_cloneCount	= SF_cloneCount[1..SF_len];
			SF_frameDelay	= SF_frameDelay[1..SF_len];
			SF_cloneDelay	= SF_cloneDelay[1..SF_len];
			SF_argument	= SF_argument[1..SF_len];

			SF_len--;

			if(SF_len !=0)
			{

				CreateEnemyWave(SF_len, SF_enemyType, SF_startX, SF_startY, SF_incrementX,
					SF_incrementY, SF_cloneCount, SF_frameDelay, SF_cloneDelay, SF_argument);
			}
		}
/***************************************************************************************************************
** End of Function: CreateEnemyWave
****************************************************************************************************************/

		let SF_len;
		let SF_enemyType;
		let SF_startX;
		let SF_startY;
		let SF_incrementX;
		let SF_incrementY;
		let SF_cloneCount;
		let SF_frameDelay;
		let SF_cloneDelay;
		let SF_argument;

