Farming Simulator Romania Forum
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

Urme roti in FS2011

2 participanți

In jos

Urme roti in FS2011 Empty Urme roti in FS2011

Mesaj  Ravasy(John Deere) Sam 26 Ian - 23:37

Cum scurtez distanta data de urmele lasate in urma rotilor?
Stiu ca e un script.Trebuie sa fie in el ceva sa-i dau o valoare mai mica.
Din 10 metri de urme sa fac doar 5 metri
Ravasy(John Deere)
Ravasy(John Deere)

Mesaje : 310
Data de inscriere : 14/09/2012
Reputatie : 0

Sus In jos

Urme roti in FS2011 Empty Re: Urme roti in FS2011

Mesaj  Ovidole Lun 28 Ian - 19:33

Lasa un link cu scriptul si o sa ma uit sa vad daca pot sa te ajut..din cate stiu acolo nu e pe distanta ci lasa urme in functie de cat de incarcate sunt...daca mergi cu trectorul pe loc cateva minute o sa iti lase urme foarte mult, daca mergi cu el cateva secunde poate nici nu o sa se observe mare lucru..
Ovidole
Ovidole
Administrator
Administrator

Mesaje : 1254
Data de inscriere : 09/09/2012
Reputatie : 1

Sus In jos

Urme roti in FS2011 Empty Re: Urme roti in FS2011

Mesaj  Ravasy(John Deere) Vin 1 Feb - 19:56

Credeam ca ai sters subiectul.
Acum m-am uitat prin Ajutor.
Eu cred ca asta e scriptul care face urmele alea dupa roti.


-- WheelDirtSpecialization
-- Specialisation for the John Deeres from "John Deere Old Version Pack"
--
-- @ Autor Tobias F. (John Deere 6930 @ 1. Ls-Modschmiede [Trebuie sa fiti inscris si conectat pentru a vedea acest link]
-- @ Last Edit 28/07/2009
WheelDirtSpecialization = {};

if BaseMission.wheelDirt == nil then
BaseMission.wheelDirt = {};
end;

function WheelDirtSpecialization.prerequisitesPresent(specializations)
return true;
end;

function WheelDirtSpecialization:load(xmlFile)
self.DirtWheels = {};
local i = 0;
while true do
local namei = string.format("vehicle.DirtWheels.DirtWheel(%d)", i);
local nodei = Utils.indexToObject(self.components, getXMLString(xmlFile, namei .. "#index"));
local dirtFileDry = getXMLString(xmlFile, namei .. "#dirtFileDry");
local dirtFileRain = getXMLString(xmlFile, namei .. "#dirtFileRain");
if (nodei and dirtFileRain and dirtFileDry) == nil then
break;
end;
self.DirtWheels[i] = {}
self.DirtWheels[i].ps = {}
Utils.loadParticleSystem(xmlFile, self.DirtWheels[i].ps, namei, nodei, false, nil, self.baseDirectory);
self.DirtWheels[i].isActive = Utils.getNoNil(getXMLBool(xmlFile, namei .. "#isActive"), true);
self.DirtWheels[i].node = nodei;
self.DirtWheels[i].dirtFileDry = dirtFileDry;
self.DirtWheels[i].dirtFileRain = dirtFileRain;
self.DirtWheels[i].distance = Utils.getNoNil(getXMLString(xmlFile, namei .. "#distance"), 0.1);
self.DirtWheels[i].timeOnDirtGround = 0;
self.DirtWheels[i].createDirt = false;
self.DirtWheels[i].LastCreatedGround = nil;
i = i+1;
end;
end;

function WheelDirtSpecialization:delete()
end;

function WheelDirtSpecialization:mouseEvent(posX, posY, isDown, isUp, button)
end;

function WheelDirtSpecialization:keyEvent(unicode, sym, modifier, isDown)
end;


function WheelDirtSpecialization:update(dt)
if self:getIsActive() then
for k, dirtWheel in pairs(self.DirtWheels) do
-- checks if node on terrainDetail
local x,y,z = getWorldTranslation(dirtWheel.node);
local cultivatorChannel = Utils.getDensity(g_currentMission.terrainDetailId, g_currentMission.cultivatorChannel, x, z, x, z, x, z);
local ploughChannel = Utils.getDensity(g_currentMission.terrainDetailId, g_currentMission.ploughChannel, x, z, x, z, x, z);
local sowingChannel = Utils.getDensity(g_currentMission.terrainDetailId, g_currentMission.sowingChannel, x, z, x, z, x, z);
if cultivatorChannel > 0 or ploughChannel > 0 or sowingChannel > 0 then
if self.movingDirection ~= 0 then
if dirtWheel.timeOnDirtGround <= 8000 then
if sowingChannel > 0 and g_currentMission.environment.lastRainScale > 0.1 and g_currentMission.environment.timeSinceLastRain < 30 then
dirtWheel.timeOnDirtGround = dirtWheel.timeOnDirtGround+self.lastSpeed*900;
else
dirtWheel.timeOnDirtGround = dirtWheel.timeOnDirtGround+self.lastSpeed*1800;
end;
end;
if self.lastSpeed*3600 > 28 and (ploughChannel or cultivatorChannel) > 0 and not (g_currentMission.environment.lastRainScale > 0.1 and g_currentMission.environment.timeSinceLastRain < 30) then
Utils.setEmittingState(dirtWheel.ps, true);
else
Utils.setEmittingState(dirtWheel.ps, false);
end;
end;
else
if dirtWheel.timeOnDirtGround > 0 then
if self.movingDirection ~= 0 then
if dirtWheel.timeOnDirtGround >= 2000 then
if self.lastSpeed*3600 > 7 then
if dirtWheel.LastCreatedGround == nil then
dirtWheel.createDirt = true;
else
local nearestDistance = 0.8;
if self.lastSpeed*3600 > 10 then
nearestDistance = 0.65;
elseif self.lastSpeed*3600 > 15 then
nearestDistance = 0.8;
elseif self.lastSpeed*3600 > 20 then
nearestDistance = 1.0;
end;
local px, py, pz = getWorldTranslation(dirtWheel.node);
local vx, vy, vz = getWorldTranslation(dirtWheel.LastCreatedGround);
dirtWheel.distance = Utils.vector3Length(px-vx, py-vy, pz-vz);
if dirtWheel.distance > nearestDistance then
dirtWheel.createDirt = true;
end;
end;
Utils.setEmittingState(dirtWheel.ps, true);
end;
end;
dirtWheel.timeOnDirtGround = dirtWheel.timeOnDirtGround-self.lastSpeed*3600;
else
Utils.setEmittingState(dirtWheel.ps, false);
end;
end;
if dirtWheel.timeOnDirtGround <= 0 then
dirtWheel.timeOnDirtGround = 0;
Utils.setEmittingState(dirtWheel.ps, false);
end;
Utils.setEmittingState(dirtWheel.ps, false);
end;
if dirtWheel.createDirt then
local i3dPath = nil;
if g_currentMission.environment.lastRainScale > 0.1 and g_currentMission.environment.timeSinceLastRain < 30 then
i3dPath = dirtWheel.dirtFileRain;
else
i3dPath = dirtWheel.dirtFileDry;
end;
local GroundRoot = Utils.loadSharedI3DFile(i3dPath, self.baseDirectory);
local GroundId = getChildAt(GroundRoot, 0);
setRigidBodyType(GroundId, "None");
link(getRootNode(), GroundId);
delete(GroundRoot);
local x,y,z = getWorldRotation(dirtWheel.node);
setRotation(GroundId, x,y,z);
local x,y,z = getWorldTranslation(dirtWheel.node);
setTranslation(GroundId, x,y,z);

local Ground = {};
Ground.id = GroundId;

table.insert(g_currentMission.wheelDirt, Ground)

dirtWheel.LastCreatedGround = GroundId;
dirtWheel.createDirt = false;
end;
end;
end;
end;

function WheelDirtSpecialization:draw()
end;
Ravasy(John Deere)
Ravasy(John Deere)

Mesaje : 310
Data de inscriere : 14/09/2012
Reputatie : 0

Sus In jos

Urme roti in FS2011 Empty Re: Urme roti in FS2011

Mesaj  Ovidole Vin 1 Feb - 21:06

..e cam complicat si este exact cum ti-am spus...iti lasa urme in functie de cat de incarcata e roata(in functie de cat de mult mergi cu el pe loc). Daca iti modific eu valorile pe acolo nu sunt 100% convins ca va merge in joc.
Ovidole
Ovidole
Administrator
Administrator

Mesaje : 1254
Data de inscriere : 09/09/2012
Reputatie : 1

Sus In jos

Urme roti in FS2011 Empty Re: Urme roti in FS2011

Mesaj  Ravasy(John Deere) Vin 1 Feb - 22:12

Cred ca m-am razgandit.
Il las asa.Pare mai realistic.
Nu stii cum as putea sa schimb textura la urmele lasate?
Adica in loc de astea sa-mi arate V-urile alea de la cauciucuri.

Urme roti in FS2011 28505837
Urme roti in FS2011 61860727
Urme roti in FS2011 21876904
Urme roti in FS2011 92296524

Urme roti in FS2011 Urmedetractor
Ravasy(John Deere)
Ravasy(John Deere)

Mesaje : 310
Data de inscriere : 14/09/2012
Reputatie : 0

Sus In jos

Urme roti in FS2011 Empty Re: Urme roti in FS2011

Mesaj  Continut sponsorizat


Continut sponsorizat


Sus In jos

Sus

- Subiecte similare

 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum