09.08.2018, 18:55
Hi. I have 5 1bit inputs and I want a logic or gate that converts the output to byte.
False = 0%
True =100%
How will the code look like?
False = 0%
True =100%
How will the code look like?
Or logic gate
|
09.08.2018, 18:55
Hi. I have 5 1bit inputs and I want a logic or gate that converts the output to byte.
False = 0% True =100% How will the code look like?
10.08.2018, 06:16
Add or_gate tag to each input object. Add an event script mapped to or_gate tag. Change 32/1/4 to your output object address.
Code: 12345678 value = false
objects = grp.tag('or_gate')
for _, object in ipairs(objects) do
value = value or object.value
end
grp.checkwrite('32/1/4', value and 100 or 0) |
« Next Oldest | Next Newest »
|