uboats Posted November 7, 2014 Posted November 7, 2014 (edited) I'm trying to learn what the sequence that the module loads its lua scripts is. What I think is that after start DCSW, the entry.lua of each module will be loaded only. Then after choosing to enter a module, then other scripts will be loaded. But in what sequence? Since I'm trying to read the variable returned from Options\optionsDb.lua. return { VariableStat = DbOption.new():setValue(false):checkbox(), } I think this 'VariableStat' is visible only for module itself. Since it is preset before the mission starts, I also thought other scripts of this module can recognize this variable. Then I tried something in other script (e.g. Cockpit/kneeboard_init.lua) like: if VariableStat == false then is_left = true else is_left = false end The purpose is to determine the position of kneeboard according to the value preset in special tab of that module. However, I found that 'VariableStat' is 'nil' which means it never able to be seen from other scripts of that module. To make it works, what should I do? Or what func should I call to get the return of special options of each module? Thanks Edited November 7, 2014 by uboats [sIGPIC][/sIGPIC] My DCS Mods, Skins, Utilities and Scripts | Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD | | TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |
Recommended Posts