Community Forum

Script Manual for LUA LS2009

Forum Overview >> Farming Simulator 2009

CategoryFarming Simulator 2009
Created13.06.2009 14:48


Claudio Accotardi (unknown) 13.06.2009 14:51
Hi,
Exist a manual what learn to write scrpt for farming simulator 2009?
Thanks
Best Regards

Christian Ammann - GIANTS Software 14.06.2009 14:59
Hi Claudio,

There are some resources on the web about how to learn scripting of the Farming Simulator 2009:

A reference of all Engine functions:
http://gdn.giants.ch/documentation_scripting.php

Some articles about Farming Simulator scripting:
http://www.ls-mods.de/articles.php

Learn to use LUA:
http://www.lua.org

A good way to learn scripting Farming Simulator mods is to read and analyze existing scripts of already released Mods.

Cheers

Claudio Accotardi (unknown) 14.06.2009 20:04
Mr. Ammann
Thanks very much
Best regards

Andreas GroƟschedl (unknown) 14.06.2009 22:20
But what is about the special function of ls2009 such as "Util.GetNoNil" and all the others? Is there a documentation existing?

ag

Christian Ammann - GIANTS Software 15.06.2009 17:43
There is no dedicated documentation to functions like Util.GetNoNil. You can read existing script files to learn how they work.

Cheers

Matthias B. (unknown) 16.06.2009 18:24
Utils.getNoNil(value, setTo)

value = inputValue (maybe string or something else)

if value == nil the function returns setTo

sample:

Utils.getNoNil(getXMLInt(xmlFile, "vehicle.Animation#count"), 0)

if there is no count set then value 0 at the end is your new value!

i hope it helps you^^

sorry for my bad english :P

Thomas H. (Patar) 20.02.2010 17:29
Someone has said that it give an existing documentation about the functions of utils and so on, but not everybody can reach this.

Stefan Geiger - GIANTS Software 22.02.2010 10:09
There is a small documentation of some of the functions here:
http://ls-mods.de/scriptDocumentation.php


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