Community Forum

Beginner Lua scripting, what functions are always needed

Forum Overview >> Scripting

CategoryScripting
Created15.02.2014 13:10


Niklas Andersson (Unknown) 15.02.2014 13:16
Hi!

I'm looking into adding a specialization to my vehicle, displaying the weight of it on screen at all times.

And I wonder what things I need to have in the .lua file for it to work at all? I do not know what it's called in English, but the word "skeleton" comes to mind. In other words what functions, headers and so on. Is there any good guide out there for complete "noobs" like me?

For all other languages I've coded (Java, C++) there are great tutorials almost always beginning with a "hello world" example. Something like this for .lua in FS would be great since it'll teach you basic output and maybe input before moving on to calculating stuff and updating them etc.

regards
Klirre

Manuel Leithner - GIANTS Software 17.02.2014 10:21
The vehicle-specializations are public:

http://www.ls-mods.de/scriptDocumentation.php?language=en

To write to the ui take a look at the Steerable.lua script at line 654
function Steerable:draw()

There are some examples.

Jamie Wagner (Unknown) 02.04.2015 21:59
what info would i need to make like the egg pallet cage placeable im not giant editor literate yet and trying to figure out how to put a map together of my old stomping grounds but wasnt able to so far i must not be doing something right


Note: Log in to post. Create a new account here.