
function On_Enter_trigger_SampleStart( )

local functionOrder;

-- FOLLOW_TRACKER_TARGET mode
functionOrder = "setCameraMode( 2, \"\", \"trackerCamera_09\", 4.0, 0.90, 0.95 )";
addOrderToSequencer ( functionOrder, 0.1 );

-- Cal definir la velocitat
for i=1,50,2 do
	if(i < 10) then
		functionOrder = "incrementWptScriptedPlatform(\"trackerPlatform_translate_10" .. i .. "\")";
	end
	
	if(i >= 10) then
		functionOrder = "incrementWptScriptedPlatform(\"trackerPlatform_translate_1" .. i .. "\")";
	end
	
	addOrderToSequencer ( functionOrder, 1.0 );
	
	local value = i + 1;
	
	if(value < 10) then
		functionOrder = "incrementWptScriptedPlatform(\"trackerPlatform_translate_10" .. value .. "\")";
	end
	
	if(value >= 10) then
		functionOrder = "incrementWptScriptedPlatform(\"trackerPlatform_translate_1" .. value .. "\")";
	end
	
	addOrderToSequencer ( functionOrder, 0.0 );
 
end

return 0;
end

function On_Enter_trigger_SampleEnd( )

-- Restablim la camera
functionOrder = "setCameraModeBlendInfo( 0, \"\", \"\", 4.0, 0.90, 0.95 )";

-- Cal definir la velocitat
for i=1,50 do

	if(i < 10) then
		functionOrder = "decrementWptScriptedPlatform(\"trackerPlatform_translate_10" .. i .. "\")";
	end
	
	if(i >= 10) then
		functionOrder = "decrementWptScriptedPlatform(\"trackerPlatform_translate_1" .. i .. "\")";
	end
	
	addOrderToSequencer ( functionOrder, 0.0 );
 
end

return 0;
end