Category | Scripting |
Created | 07.05.2023 12:44 |
Sablerock (Sablerock) | 07.05.2023 12:44 |
---|---|
Man I’m struggling. So I copied LUA woodunloadtrigger.lua from Farming Simulator 2022\sdk\debugger. Under SCRIPTS. Rename all text “WoodUnloadTrigger” to “NewWoodsellTrigger”. Then place lua in moddesc of my modmap. At the bottom of lua i have: WoodUnloadTrigger.processWood = Utils.overwrittenFunction (WoodUnloadTrigger.processWood, function(self, superfunc, farmId, noEventSend) print("Overwrite Process Wood") NewWoodselltrigger:processWood(farmId, noEventSend) end) So the idea is to overwrite some of base functions, and step thru them line by line so that I know exactly what happens when you press “ sell wood” ingame. But which of these other functions must be called and in what sequence? My new function is interdependent on variables/ tables from other functions. So ingame it picks up my new functions, but then its error upon error. Pls give me some pointers before I wast more time. |
Note: Log in to post. Create a new account here.