This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Universal script
#4
The calculation was wrong in the previous example.
Add a common tag to input objects (2/3/10, 2/3/11, 2/3/12 etc) and map an event script to this tag (no need to add anything to Common functions).
Code:
basein = buslib.encodega('2/3/10')
baseout = buslib.encodega('2/3/200')
dst = baseout + 2 * (event.dstraw - basein)

if event.getvalue() then
  dst = dst + 1
end

grp.write(dst, true)
os.sleep(1)
grp.write(dst, false)
Reply


Messages In This Thread
Universal script - by Borek - 03.10.2022, 15:21
RE: Universal script - by admin - 04.10.2022, 06:30
RE: Universal script - by Borek - 04.10.2022, 16:16
RE: Universal script - by admin - 05.10.2022, 06:35

Forum Jump: