It took me awhile to figure out how to "--turn off the output" and to understand the signal library somewhat
I am still a little cloudy on when you would put something in the Signal Script
I know I read or watched a video that say what hsig and rc are/do, but now I cannot find it again. I just know I found something like this elsewhere and modified it and it seems to work
I am not sure if it is the best way, but it does seem to work by putting this in the Screen Load Script as you recommended above...
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
machEnabled = state;
ButtonEnable()
-- Start P&W Mill Added to turn off oiler & Mist (MicroDrop) if Disabled
if (state == 0) then
local inst=mc.mcGetInstance()
local hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_MISTON)
mc.mcSignalSetState(hsig, 0); --sets OSIG_MISTON to False
end
if (state == 0) then
local inst=mc.mcGetInstance()
local hsig, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT4)
mc.mcSignalSetState(hsig, 0); --sets OSIG_OUTPUT4 to False
end
-- End P&W Mill Added to turn off oiler & Mist (MicroDrop) if Disabled
end,
I am trying to add notes in there so when I forget all of this later it might jog my memory. Once I get this machine running the way I want, I don't expect to use any of this until I build another machine, which could be awhile.