
MakePlatform() //used to define the function.
{
}

EveryTurn(Turn) //note that these MUST MATCH for compounding functions.  Also, Turn "0" counts as initialization code
{
	if (mod(Turn, 2) == 0)
	{
		SetActive("Door"); //Door is the code affected by this
		B_SetSpinning(0); //B_ means that the function affects Barriers
	}
	else if (mod(Turn, 2) == 1)
	{
		SetActive("Door");
		B_SetSpinning(90);
	}

	if (Turn == 2)
	{
		SetActive("SHIPS");	
		S_StripCompType(8);	
		S_StripCompType(9);
		call-script MakePlatform();
	}

	SetActive("KILL_ME");
	//SetActive(S_GetTeamID());
	Destroy();
}

OnHitDoor() //Door is a group, and this function is called when a member of group "Door" collides with something else (Possibly another door even)
{
	SetActive("COLLIDED"); //object collided with
	//Destroy();
	S_GiveCloak(2);
	S_GiveComp(0, 7, 0, 0, 0, 0, 0);
	S_GiveComp(0, 7, 0, 0, 0, 0, 0);
	S_GiveComp(0, 7, 0, 0, 0, 0, 0);
	S_GiveComp(1, 7, 0, 0, 0, 0, 0);
	SetActive("COLLIDER"); //object in door group colliding
	B_SetSpinning(0);
}