1. // This function is used to replace the cactus with a stump to demonstrate the plant has been consumed
  2.  
  3. function spawnStump( %pos )
  4. {  
  5.  // %pos = %i SPC %j SPC %z SPC "0 0 0.5 3.14";
  6.    %x = getWord( %pos, 0);
  7.    %y = getWord( %pos, 1);
  8.    %z = getWord( %pos, 2);
  9.    %z -= 0.0125; // drop it into the sand a bit so the roots dont show  
  10.  
  11.    %scale = "0.5 0.5 1";
  12.  
  13.    %number = 1;//getRandom(1,6);
  14.    %type = "stump00" @ %number @ "Data";
  15.    
  16.    %resource = new (RigidShape)()
  17.    {
  18.         scale = %scale;
  19.         dataBlock = %type;
  20.    };
  21.    
  22.    %resource.setTransform( %x SPC %y SPC %z SPC "0 0 0.5 3.14" );
  23.          
  24.    echo("type= " @ %type );
  25.    
  26.    MissionCleanup.add(%resource);  
  27.    
  28. }