I hope this isn´t a stupid question but what´s LUA scripting

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

Locked
simon3747
Well Established Forum Member
Posts: 644
Joined: Sun Jan 06, 2008 12:53 pm
Location: Sunny Southend, Essex

I hope this isn´t a stupid question but what´s LUA scripting

Post by simon3747 »

I´ve heard of it but I´m in the dark. Does anybody have any examples?

Thanks in advance,

Simon3747
User avatar
Juanillo99
Well Established Forum Member
Posts: 879
Joined: Sat Oct 13, 2012 5:12 pm
Location: Teruel - Spain
Contact:

Re: I hope this isn´t a stupid question but what´s LUA scripting

Post by Juanillo99 »

My Spanish website dedicated to Train Simulator 2019: https://ferrosim.es
Image
wacampbell
Been on the forums for a while
Posts: 174
Joined: Tue May 14, 2002 12:00 am
Location: Wayne Campbell, BC, Canada

Re: I hope this isn´t a stupid question but what´s LUA scripting

Post by wacampbell »

LUA is a computer programming language described here:

http://www.lua.org/about.html

A LUA script is just another name for a LUA program.

In the context of TS2015, these scripts are written by the builders of the various scenery items to give them control over how they behave. For example, a LUA script for a railway crossing gate would check for the presence of a train, and when one came near, it would flash the lights, lower the gate, ring the bell etc. LUA scripts are used to control the train signalling lights along the rail line and to give special functionality to locomotives, turning on the running lights for example when a certain key is pressed. There are many other uses as well.
Locked

Return to “[TS] General Discussion”