Hello Guest it is April 26, 2024, 09:09:17 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tinker Smurf

Pages: 1
1
Mach4 General Discussion / Re: need help with script
« on: August 31, 2015, 03:50:18 PM »
Found out that the piece of script from poppabear isn't working as intended. If you only activate one of either inputs the task wil already be executed.
the correct way to do this is.

local Input1 = 0;
local Input10 = 0;
local hSig = 0;

hSig = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1);
Input1 = mc.mcSignalGetState(hSig);

hSig = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT10);
Input10 = mc.mcSignalGetState(hSig);

if ((Input1 == 1) and (Input10 ==1)) then
    local inst = mc.mcGetInstance();
    mc.mcCntlCycleStart(inst);
end


I hope it is to some use.

Marco.
end

Pages: 1