Community Forum

updateWeederArea function

Forum Overview >> Scripting

Created21.05.2020 14:26

Kenny Je (kenny456) 21.05.2020 14:26
Hi, i am trying to remove weeds from non fields areas. Is there any way i can get function FSDensityMapUtil.updateWeederArea work outside of fields? Is there sourcode of this function?
I also tryied something like this, but it does not work:

mapModifier = g_currentMission.densityMapModifiers.updateWeederArea.modifier
filter1 = g_currentMission.densityMapModifiers.updateWeederArea.filter1
filter2 = g_currentMission.densityMapModifiers.updateWeederArea.filter2
mapModifier:setParallelogramWorldCoords( xs,zs, xw,zw, xh,zh, 'ppp')
filter2:resetDensityMapAndChannels(g_currentMission.fruits[13].id, 0,4)
filter2:setValueCompareParams("equal", 0)
mapModifier:executeSet(0, filter1, filter2)

Kenny Je (kenny456) 25.05.2020 18:38
So nobody knows how to remove weeds from outside of fields, from grass meadow e.g? I tried this function, but it remove weeds only in fields:

local realArea, area, sprayFactor, plowFactor, limeFactor, weedFactor, growthState, growthStateArea, terrainDetailPixelsSum = FSDensityMapUtil.cutFruitArea(16, xs,zs, xw,zw, xh,zh, true, true, true)

But realArea is allways 0 outside of fields.

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