Page 1 of 1

Easy math issue for newbie

Posted: 26 Sep 2016 18:18
by nizer
Just want to have a number count down by minutes.

Say 90 appears in a field and subtracts 1 from it every minute.

Thanks for any help.

Re: Easy math issue for newbie

Posted: 26 Sep 2016 21:38
by MrCorba
I've added a working example below. I've added comments to hopefully let you understand what's going on, so you can use the logic in other scripting;)

Re: Easy math issue for newbie

Posted: 26 Sep 2016 23:06
by nizer
Amazing thank you.

I have a couple more tweaks that I can't figure out cuz I'm not a programmer.

Can it turn red when it is below zero, have a minus sign by it and continue to count down?

I assume I can remotely via OSC from QLab send a "time" variable to change the 90 to some other time.

So much appreciate the work you did.

Re: Easy math issue for newbie

Posted: 27 Sep 2016 17:22
by MrCorba
If you remove the if statement and everything in it, it will get passed zero with a negative.

For the color you can just use a same like if statement but use "setattribute(Object, 'color', ####)'. If you check the lemur user guide I'm sure you can figure it out. Let me know if you succeed.