Community Forum

How to make AI to use this script

Forum Overview >> Scripting

CategoryScripting
Created23.07.2020 04:15


Ades Sadaert (Drandrad) 23.07.2020 04:15
Hi i need help with this script
Actually script is working but only on player controlled vehicles
What i need is to make AI use this script as well if someone can help Thanks !!



(SCRIPT)
Destruction = {};
function Destruction:loadMap(savegame)
for name,fruitType in pairs(g_fruitTypeManager.nameToFruitType) do
if name ~= "GRASS" and name ~= "POPLAR" then
local destruction = {9}
destruction.filterStart = 2 --3
destruction.filterEnd = 4 --4
destruction.state = 9 --2; set to 3 for less impact
destruction.onlyOnField = true --false
fruitType.destruction = destruction
end
end
end

Ades Sadaert (Drandrad) 24.07.2020 17:41
Emil Drefers you did similar mod for Fs17 and AI did destructed crops until 1.0.2.1 version if you can guide me here i would be really thankful


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