// Handles Trails.
// Worthless Bums 2012.


// Test function to randomly spawn blood splatter!
function tbs ()
{//echo("tbs()");
	%bloodSplatterCount = 500;
	$bloodSplatter = new SimSet();
	for (%i = 0; %i < %bloodSplatterCount; %i++)
	{
		// Generate random tile position.
		%xIndex = getRandom(0, 63);
		%yIndex = getRandom(0, 63);
		// Create blood splatter sprite to place over hit character.
		%bloodSplatter = new Sprite()
		{
			SceneLayer = 1;
			scenegraph = levelSceneGraph;
			image = "Sprites:BloodSplatterFloor";
			position = getTilePositionFromIndices(%xIndex, %yIndex);
			size = "4 4";
			visible = true;
		};
		addObjectToScene(%bloodSplatter);
		$bloodSplatter.add(%bloodSplatter);
	}
}