Kali wrote:I knocked up a stand-alone version, it's attached. It's prototype code ( I'm doing a whole new set of libraries ) but it should be perfectly functional - let me know if it's not ( and note all I've done with this version is run luac -p over it ).
To use: add
require("/path/to/library/ControlCacheSA.lua")
to the script & start using the functions. Note that I think lua paths use unix-type "/".
OK, If you could help me out a little:
Here is where I put the ControlCacheSA.lua script:
Assets\K-rail\Scripts\Generic\ControlCacheSA.lua
So would I add this line to the script for the AEM7
require("/Assets/K-rail/Scripts/Generic/ControlCacheSA.lua") right at the very top?
Like this:
require("/Assets\K-rail\Scripts\Generic\ControlCacheSA.lua")
--------------------------------------------------------------------------------------
-- Engine Script for AEM7 electric locomotive
-- RailWorks 2: Train Simulator
--------------------------------------------------------------------------------------
--
-- Updates controls, reads messages from signals and set engine controls for
-- cab signalling. Controls flashing of appropriate aspects.
--
--------------------------------------------------------------------------------------
Please correct me where I have erred.