|Category||Farming Simulator 2009|
|Tobias S. (rambo_86)||14.01.2010 00:18|
i want to move my siloplane to another y coordinate. I have written this little part in my sourcecode to move the siloplane. The plan should be lowered, while i load the shovel of my tractor until the shovel is full or the silo is empty. -1.4 is the minLevel of my silo. what´s the mistake? Thanks
local x,y,z = getTranslation(g_currentMission.tipTriggers[i].movingId);
if y > -1.4 then
local deltaFillLevel = dt*self.fruitTrigger[i].fillSpeed;
setTranslation(g_currentMission.tipTriggers[i].movingId, x, y - 0.003 ,z);
I have found a mistake: the "g_currentMission.tipTrigger[i].movingId" is nil according to the log.txt. Why is it nil? this sourcecode is included in the game as an extra sourcefile. i have used the same expression in movable milktrigger and it works. but why there not?
|Christian S (unknown)||16.01.2010 13:03|
because not all Triggers have a Plane, so there is no movingId.
Note: Log in to post. Create a new account here.