Compare Timeline_Actives?
vegastech
Posts: 369
Is it possible to compare multiple timelines for an IF statement? I have two timelines, one for turning a rear projection CRT on, and another for turning it off. Like many projectors, it will not respond to commands while in its warm-up or cool-down states. I am doing nested IF statements like this:
BUTTON_EVENT[dcTvCmds] //tv inputs, power { PUSH: { IF (!TIMELINE_ACTIVE(tl_TVWarmUp)) { IF (!TIMELINE_ACTIVE(tl_TVShutDown)) { SWITCH (get_last(dcTvCmds)) { CASE 1: SEND_STRING dvTV, ""However, I don't think that will work every time. Is there a way for me to reference the status of both timelines on a single line? Like with an AND or an &&? Something like:
IF (!TIMELINE_ACTIVE(tl_TvWarmUp)) && (!TIMELINE_ACTIVE(tl_TvShutDown))
0
Comments
Nope, the && is what he wants. The ! operator takes precedence and "sticks" to the timeline_active function. The II will fire if either is inactive, and he only wants it if both are.
!(T || T) = F
!(T || F) = F
!(F || T) = F
!(F || F) = T
Look at the parenthesis location. You can also do it like vegastech was questioning (although there is a syntax error with that code), I was just trying to do it a different way.