snoughplough.lua

Epäselvyyksiä & ongelmia Farming Simulator 2015 pelissä tai yleisesti? Kysy rohkeasti pois mitä ikinä asiasi sitten koskeekaan sillä pelin asiantuntevat vastaavat & auttavat mielellään.
jboy912
Viestit: 9
Liittynyt: 08.12.2016 16:56
Multiplayer tunnuksesi?: Tunnuksesi?

snoughplough.lua

Viesti Kirjoittaja jboy912 »

Elikkä konvasin,starkin alueauran fs15 fs17 ja modi toimii muuten paitsi ge valittaa tuosta scriptistä,en saa laitettua
auraa traktoriin kiinni vaikka etukuormaimelle se on tarkoitettu,osaisiko joku päivittää scriptin niin,että se toimii myös fs17,
tai edes neuvoa kuinka päivittää kyseinen tiedosto toimimaan myös 17?.

Tuollaista söperrystä tiedostossa on mutta en tiedä mitä pitää tehdä.


--
-- SnoughPlough – overriding function for Windrower:updateTick
--
-- Sample sound (defined by 'windrowerSound' in vehicle's XML file) is played
-- only when plow is low enough.
--
-- @author: ilta - ls-fin.com, ls-uk.com (ilta@iki.fi)
-- @version: v1.0
-- @date: 2016-03-20

SnoughPlough = {};

function SnoughPlough:updateTick(superFunc, dt)
self.isWindrowerSpeedLimitActive = false;
if self:getIsActive() then
if self:getIsTurnedOn() then
local hasGroundContact, typedWorkAreas = self:getIsTypedWorkAreaActive(WorkArea.AREATYPE_WINDROWER);
self.hasGroundContact = hasGroundContact;

if hasGroundContact then
self.isWindrowerSpeedLimitActive = true;
if self.isServer then

local workAreasSend = {};
local typedWorkAreasDrop = self:getTypedWorkAreas(WorkArea.AREATYPE_WINDROWERDROP);
for k, workArea in pairs(typedWorkAreas) do
if self:getIsWorkAreaActive(workArea) then
local x,y,z = getWorldTranslation(workArea.start);
local x1,y1,z1 = getWorldTranslation(workArea.width);
local x2,y2,z2 = getWorldTranslation(workArea.height);

local dropArea = typedWorkAreasDrop[workArea.dropAreaIndex];
local dx,dy,dz = getWorldTranslation(dropArea.start);
local dx1,dy1,dz1 = getWorldTranslation(dropArea.width);
local dx2,dy2,dz2 = getWorldTranslation(dropArea.height);

table.insert(workAreasSend, {x,z, x1,z1, x2,z2, dx,dz, dx1,dz1, dx2,dz2, 0, k});
end;
end;

if table.getn(typedWorkAreas) > 0 then
local workAreasRet, fruitType, bitType = WindrowAreaEvent.runLocally(workAreasSend, self.accumulatedWorkAreaValues, self.accumulatedFruitType);

if table.getn(workAreasRet) > 0 then
self.accumulatedFruitType = fruitType;
g_server:broadcastEvent(WindrowAreaEvent:new(workAreasRet, fruitType, bitType));

if self:getLastSpeed(true) > 0.5 then
for i=1, table.getn(workAreasRet) do
if workAreasRet[13] > 0 then
local workArea = typedWorkAreas[workAreasRet[14]];
for _,v in pairs(self.windrowerParticleSystems) do
if v.ps ~= nil and v.workAreaIndex == workAreasRet[14] and v.fruitType == self.accumulatedFruitType then
v.disableTime = g_currentMission.time + 300;
if not v.isEnabled then
v.isEnabled = true;
self:raiseDirtyFlags(self.windrowerGroundFlag);
if self.isClient then
Utils.setEmittingState(v.ps, true);
end;
end;
end;
end;
end;
end;
end;

end;
end;
end;

-- Play sound if tool has ground contact
if self.isClient and self:getIsActiveForSound() then
Utils.playSample(self.sampleWindrower, 0, 0, nil);
end;
else
if self.isClient then
-- No ground contact => stop sample
Utils.stopSample(self.sampleWindrower, true);
end;
end;

if self.isServer then
for k,v in pairs(self.windrowerParticleSystems) do
if g_currentMission.time > v.disableTime then
if v.isEnabled then
v.isEnabled = false;
self:raiseDirtyFlags(self.windrowerGroundFlag);
if self.isClient then
Utils.setEmittingState(v.ps, false);
end;
end;
end;
end;
end;

end;

end;

if self:getIsTurnedOn() or self.animation.alpha ~= 0 then
self.animation.alpha = Utils.getMovedLimitedValue(self.animation.alpha, 1, 0, self.animation.fadeTime, dt, not self.doTurnOn);

if self.animation.alpha == 0 then
if self.animationEnabled and self.animation.animCharSet ~= 0 then
disableAnimTrack(self.animation.animCharSet, 0);
self.animationEnabled = false;
end;
end;

if self.animationEnabled and self.animation.animCharSet ~= 0 then
setAnimTrackSpeedScale(self.animation.animCharSet, self.animation.clip, self.animation.speedScale*self.animation.alpha);
end;
end;
end;
Windrower.updateTick = Utils.overwrittenFunction(Windrower.updateTick, SnoughPlough.updateTick);
jboy912
Viestit: 9
Liittynyt: 08.12.2016 16:56
Multiplayer tunnuksesi?: Tunnuksesi?

Re: snoughplough.lua

Viesti Kirjoittaja jboy912 »

elikkä kun yritän kiinnittää auraa traktoriin niin ei onnistu.
Vastaa Viestiin

Palaa sivulle “Ongelmat & ratkaisut”