Logic Machine Forum
Script - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Script (/showthread.php?tid=5145)



Script - oyvindnordbo - 11.12.2023

Can some one help me with this script.
When I have a 0 at address 32/1/42 I will have a 1 at address 32/1/45.
When I have a 1 at address 32/1/42 I will have a 3 at address 32/1/45.
Address 32/1/42 is 1 bit and 32/1/45 is 2 bytes


RE: Script - FatMax - 11.12.2023

Here you go, attach as a Event script at address 32/1/42:

Code:
    if event.getvalue() == false then
        grp.write('32/1/45', 1)
    else
        grp.write('32/1/45', 3)
    end