Help - how to prevent folding when trailer is loaded

Your forum for all discussions around Modding.
Alpha_Omega
Posts: 3
Joined: Wed Apr 15, 2020 7:07 pm

Help - how to prevent folding when trailer is loaded

Post by Alpha_Omega »

Hello,

I have a trailer that I am working on that has the fold/unfold capability. When the trailer is unfolded and is carrying crops, I would like to disable the ability to fold it again until it has been empty of its cargo (bulk materials) - Similar to how combines/harvesters will not let you fold them until they are empty of their contents.

Is it possible to do this? I've tried studying examples of the harvesters but had no luck in figuring this out.

I appreciate any help or info in order to achieve this. Thank you.
Procobator
Posts: 337
Joined: Tue Aug 02, 2016 2:39 pm

Re: Help - how to prevent folding when trailer is loaded

Post by Procobator »

Check the script documentation on the GDN website for the folding specialization to see if there are any tags in the lua that will prohibit folding when loaded. If none exist you could make a lua script for it and add it to your equipment.
Eische
Posts: 3804
Joined: Thu Oct 18, 2018 5:17 pm

Re: Help - how to prevent folding when trailer is loaded

Post by Eische »

I found this in the MB35 of the Holmer Pack:

Code: Select all

<fillUnit>
        <fillUnitConfigurations>
            <fillUnitConfiguration>
                <fillUnits allowFoldingWhileFilled="false">
                    <fillUnit unit="$l10n_unit_literShort" fillTypes="chaff sugarBeet potato grass_windrow drygrass_windrow" capacity="35000" >
                        <exactFillRootNode node="exactFillRootNode" />
                    </fillUnit>
                </fillUnits>
            </fillUnitConfiguration>
        </fillUnitConfigurations>
    </fillUnit>
I would guess the allowFoldingWhileFilled parameter is what you are looking for.
Playing on PC - Win10
Ryzen 3600
RX 5500XT
16GB Ram
How to post log file
How to upload pictures
Please report bugs for FS22 using the bugtracker
Alpha_Omega
Posts: 3
Joined: Wed Apr 15, 2020 7:07 pm

Re: Help - how to prevent folding when trailer is loaded

Post by Alpha_Omega »

Sorry for the late response, I stopped checking the forums about a month ago.

@Eische - Your solution worked perfectly! Thank you for taking the time to respond and help, I really appreciate it. *thumbsup*
Eische
Posts: 3804
Joined: Thu Oct 18, 2018 5:17 pm

Re: Help - how to prevent folding when trailer is loaded

Post by Eische »

Nice. Thanks for the feedback!
Playing on PC - Win10
Ryzen 3600
RX 5500XT
16GB Ram
How to post log file
How to upload pictures
Please report bugs for FS22 using the bugtracker
Post Reply