// This function is used to replace the cactus with a stump to demonstrate the plant has been consumed
function spawnStump
( %pos )
{
// %pos = %i SPC %j SPC %z SPC "0 0 0.5 3.14";
%z -= 0.0125; // drop it into the sand a bit so the roots dont show
%scale = "0.5 0.5 1";
%number = 1;//getRandom(1,6);
%type = "stump00" @ %number @ "Data";
%resource = new (RigidShape)()
{
scale = %scale;
dataBlock = %type;
};
%resource.setTransform( %x SPC %y SPC %z SPC "0 0 0.5 3.14" );
echo("type= " @ %type );
MissionCleanup.add(%resource);
}