Help - Asset Construction UI paramter changes not reflected in checkEnabledScript

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • Hi, I've been following the wiki to create an asset construction (.con.lua) for my Mark 2 coaches for Transport Fever 3. These are organized into 8 vehicle sets, each containing around 5-6 vehicles, each vehicle has between 1 and 10 variants. In the game, the menu renders correctly, and I am able to place the first variant of the first vehicle of the first set :

    I have created an updateFn which correctly resolves the model to be placed based on the input params. I have also written a checkEnabledScript which hides the irrelevant menus (eg vehicles which do not belong to the currently selected vehicle set, or variants which do not belong to the currently selected vehicle). However, as soon as I enable checkEnabledScript, updateFn stops working. I've debugPrinted the parameters from checkEnabledScript, and they are not updating according to the menu. For example, if I set the combo box to item 3 in the game, checkEnabledScript still says the current index is 1.


    I am wondering if this is a game bug rather than a configuration error?
    I have noticed that CheckEnabledScript runs constantly, at least every second - is that the correct behaviour?

    Files attached - Any help would be greatly appreciated!


    Many thanks,
    Avro / PS

  • Update - I think the UI system cannot handle multi-level dependency in checkEnabledScript. e.g.
    "Box C is only shown when box B is shown which in turn is only shown when box A is shown"

    Would that be correct?