Category | Scripting |
Created | 25.06.2016 20:31 |
Eric Rosson (Unknown) | 25.06.2016 20:45 |
---|---|
hello Where find the function explanation : "addModEventListenerr" Are there other specific functions farming unexplained in your documentation ? If yes, where found them ? Thanks Eric |
Emil Drefers (Unknown) | 27.06.2016 07:26 |
---|---|
Hi, a lot of code can be found here: http://ls-mods.de/ But a lot of code is not documented, I guess for obvious reasons. Well, addModEventListener() ads the object to a table and by this enables calling of several functions. e.g. deleteMap() loadMap() mouseEvent() keyEvent() update() draw() So, you could use this approach to get that functions called in a mod which is not a vehicle. Cheers, Emil |
Eric Rosson (Unknown) | 27.06.2016 17:30 |
---|---|
Thank you Emil for your answer another question : why in a file ".lua" several functions are not added to a table with "addModEventListener()". Why only some are added ? Thank again Eric |
Emil Drefers (Unknown) | 28.06.2016 07:32 |
---|---|
Hi, can you name an example? The "g_modEventListeners" does not ad the single functions, it ads the object which has all the functions. But maybe I misunderstood you? Cheers, Emil |
Martin Fabik (Hungar) | 28.06.2016 11:16 |
---|---|
Hi Emil, in your reply (from 27.6.) is complete list of avaiable functions for addModEventListener();? If not could you give me complete list? Cheers, Martin FabĂk. |
Eric Rosson (Unknown) | 28.06.2016 12:47 |
---|---|
hi, I had understood well your explanation. In fact i found a "mod" on the web with one fichier ".lua" which contains 2 objects with several functions related. But only one of these two objets is added by "addModEventListener()". However the functions of the other object are also used. I don't understand why... Thanks Eric |
Emil Drefers (Unknown) | 29.06.2016 07:48 |
---|---|
Hi, @Martin: the given list shows all functions which are specific to the "modEventListeners". But you can achieve more eventually. Depends on what you wanna do and what you need. @Eric: hmmmm, really not sure, would need to have a look into that .lua. But I can remember some "mods" which ad functionalities to maps. They create one "listener" object and (depending on the user attributes in the map) one or more "action objects". Cheers, Emil |
Eric Rosson (Unknown) | 29.06.2016 13:08 |
---|---|
Here is the link of the mod : http://www.farming-simulator.com/mod.php?lang=fr&country=fr&mod_id=12217&title=fs2015 The name of the file is "rafftnixGUI.lua", it contains two objects wich only one is added with "addmodEventListeners" cheers Eric |
Note: Log in to post. Create a new account here.