#include "zcommon.acs"

int filled;

script 1 (void)
{
	//Only fill once.
	if (filled==0) {
		//Here the blood is spilling from the opening down the wall.
		SetLineTexture(1, SIDE_FRONT, TEXTURE_BOTTOM, "BFALL1");
		Delay(2);
		
		//The floor of the trough turns to blood.
		ChangeFloor(3, "BLOOD1");
		
		//Here we change the sides of the rough to blood stained.
		SetLineTexture(2, SIDE_FRONT, TEXTURE_BOTTOM, "MARBLOD1");
		Delay(2);

		//Now the blood is spilled over into the basin.
		SetLineTexture(3, SIDE_FRONT, TEXTURE_BOTTOM, "BFALL1");
		Delay(2);

		//The basin floor becomes blood.
		ChangeFloor(1, "BLOOD1");

		//This will cause the blood to fill the basin.
		Floor_RaiseByValue (2, 4, 17);

		//Wait till the floor is finished moving.
		TagWait(2);
		
		//Restore the spi;; way back to its original textures.
		SetLineTexture(1, SIDE_FRONT, TEXTURE_BOTTOM, "MARBLE1");
		ChangeFloor(3, "DEM1_5");
		SetLineTexture(2, SIDE_FRONT, TEXTURE_BOTTOM, "MARBLE1");
		SetLineTexture(3, SIDE_FRONT, TEXTURE_BOTTOM, "MARBLE1");

		//Set the fill flag.
		filled=1;
	}
}
