AposMus wrote: ↑
Mon Sep 30, 2019 5:23 pm
Megatriginfo seems to be a string parameter. I managed to set a string to it, but it doesn't seem to return any other value than the string you supplied it.
Wouldn't it be better to set all your conditions via scripting and ditch the Megatrig modules all together?
It might, but then all the 'user options' around them must be coded as well, while when using megatrigs all it takes is linking elements to already existing HALion parameters for most of the stuff. Mega-trigs rock because they are easy and fast to use. It's bone head easy to make changes on the fly during the design, and post design polish and tweak process. They are rather flexible as well. Too bad that info parameter doesn't spit out more 'documented' info (like a table or something that can be snooped).
I can see the point in using a custom script if the script itself needs to be able to delay or trigger its own key-switches. Otherwise...megatrigs are great. All they need to be even better is a better info pin to grab the status from, a built in timer in case you want to 'buffer or delay' its actions, and perhaps the ability to send data through it from scripts, or an 'option' to swap the order so lua processing comes before megatrigs rather than after them....a back door of sorts (as it seems the megatrig is processed BEFORE lua scripts, rather than after.
I.E. What if there was a blank at the very top of the megatrig module user interface, where one could insert a script 'upstream' of the megatrig? Or a checkbox in the lua module itself. Wishful thinking for the future.....
Snooping the trigger count gets the job done in this case. It's more efficient if key switches are set to the sticky mode (in the held down 'temporary' mode, the count keeps pulsing pretty regularly), but still works either way.
At this point, I'm just wondering how to enter a value for (no limit) as the maximum value when defining the parameter. The default if one simply leaves out the 'max' entry is 100.
When I tried a really huge value (the theoretical limit for a 64bit integer) like: 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368
It quit working and would only display odd looking characters in the elements attached to the parameter. The simple 5 integer Focus parameter obviously was broken as well.
The smaller integers in the example script above work just fine....but it's possible if I were to leave the rig running for a long time without relaunching things...it'll eventually choke and one will have a jumpy erratic macro at best, and possible crashes at worst. I can and will experiment, but hoped someone might know.