Category | Scripting |
Created | 05.07.2017 20:02 |
Jim Panousis (Jimi540) | 05.07.2017 20:02 |
---|---|
Hello, I want through script to change/decrease the fillLevel of a specific fruit in the main farm silo, etc wheat. I know that the silo is here: g_currentMission.farmSiloTrigger I know how to get the fillLevel of a fruit: g_currentMission.farmSiloTrigger:getFillLevel(fillType) I can't make it work to change the capacity through: g_currentMission.farmSiloTrigger:setFillLevel(fillLevel - delta, fillType); I'm taking always the error: attempt to call method 'setFillLevel' (a nil value) whatever combination i'm making in the setFillLevel parameters. Any help? My Regards, Jim |
Emil Drefers (Unknown) | 24.07.2017 07:56 |
---|---|
Hi, the variable g_currentMission.farmSiloTrigger points to an inheritance of the SiloTrigger class. This has a connection to some storage. That connection was set by addSiloSource(). So, your 'target' is in the table 'siloSources' of the trigger and of type 'Storage'. https://gdn.giants-software.com/documentation_scripting.php?version=script&category=65&class=3362 Cheers, Emil |
Note: Log in to post. Create a new account here.