Community Forum

Stop a hired tractor in code

Forum Overview >> Farming Simulator 2013

CategoryFarming Simulator 2013
Created21.11.2012 20:44


Peter Van Der Veen (Unknown) 21.11.2012 20:44
Hi

I'm a bit lost :)

Do you know how i can stop a hired tractor in code?

I have the following, (partly code)
I go throught the list of of steerables and then the list of implements
and if the filltype is fertilizer or seeds and the percentage is drop below
1 then i want to stop the hired vehicle, but how??

Maybe you know?

for i=1,table.getn(g_currentMission.steerables) do
local vehicle = g_currentMission.steerables[i];
for Index,implement in pairs(vehicle.attachedImplements) do
if (FillType == "fertilizer" or FillType == "seeds") and FillPercentage < 1 then
NEED TO STOP TRACTOR
end;


I have tried different commands, and when running i see the key command
window shows me 10 lines like 'H discard worker', so it does something,
but it does not stop the hired tractor.

Any ideas?


Ellinor Ström (Unknown) 30.11.2012 14:58
to stop a hired vehicle:

self:stopAITractor(true);

or to start it:

self:startAITractor(true);


Titus Bottinga (titusgosse) 15.12.2012 17:05
als ik een tracktor mod wil kopen krijg ik your selection is being purchased hoe kan ik dit veranderen


Note: Log in to post. Create a new account here.