I found this very helpful for getting me started with the basic syntax of Lua -
http://nixstaller.berlios.de/manual/0.2 ... ler_9.html
enjoy
Lua 101
- MickCrozier
- Posts: 288
- Joined: Tue Mar 31, 2009 3:10 am
- Primary Venue / Use: Professional Theatre
- Where I Am: Melbourne, Australia
- Location: Melbourne, Australia
Lua 101
Formerly Durisian (who died peacefully of digital old age)
- BobbyHarrell
- Posts: 2332
- Joined: Fri Oct 12, 2007 10:51 am
- Location: Livingston, NJ
- Contact:
Re: Lua 101
thanks for this.
Bobby Harrell - Product Specialist
Philips Entertainment - Strand Lighting
Philips Entertainment - Strand Lighting
Re: Lua 101
Thanks for the link, it was helpful.
A couple of uneducated questions -
What is the lifespan of a lua variable? They seem to live longer than just the script they are used in. They can also be used by other scripts right?
Do you have to pay attention to killing them off?
They dont survive between session? Will restarting the software clean them all out?
Is there any type of timer or count function? Like wait(some amount of miliseconds)
A couple of uneducated questions -
What is the lifespan of a lua variable? They seem to live longer than just the script they are used in. They can also be used by other scripts right?
Do you have to pay attention to killing them off?
They dont survive between session? Will restarting the software clean them all out?
Is there any type of timer or count function? Like wait(some amount of miliseconds)
Light palette : classic
Nederlands Dans Theater.
"Come forth and thy shalt win eternal happiness", but he came fifth, so he won an electric toaster.
Nederlands Dans Theater.
"Come forth and thy shalt win eternal happiness", but he came fifth, so he won an electric toaster.
- BrianEvans
- Posts: 700
- Joined: Fri Oct 12, 2007 1:11 pm
- Location: Orlando, Florida
Re: Lua 101
Lua variables that are not local, live your entire palette session.
Variables do not get wiped until you close Palette,
and re-open.
Timer is something I wanted a while ago as well,
it was attempted in the engine,
but found to be dangerous and costly in the current architecture.
Major re-work was found to be required.
(Was pausing the entire UI).
(Behaved Like Loop / Do GetTickCount in VB.)
Variables do not get wiped until you close Palette,
and re-open.
Timer is something I wanted a while ago as well,
it was attempted in the engine,
but found to be dangerous and costly in the current architecture.
Major re-work was found to be required.
(Was pausing the entire UI).
(Behaved Like Loop / Do GetTickCount in VB.)
Brian Evans - System Specialist - Horizon Control Inc.
- RobertBell
- Posts: 2421
- Joined: Fri Oct 12, 2007 1:11 pm
- Primary Venue / Use: Other
- Where I Am: Horizon Control Inc
- Location: On the dark side just north of Toronto
- Contact:
Re: Lua 101
Try:
HC.VariableSetDelayed('page','name' | order,'value' | value,seconds)
Often works good enough - but means you have to split the code in 2 (pre and post branch)
HC.VariableSetDelayed('page','name' | order,'value' | value,seconds)
Often works good enough - but means you have to split the code in 2 (pre and post branch)
Robert Bell - Product Manager - Horizon Control Inc.