Community Forum

File LUA duplicate

Forum Overview >> Farming Simulator 15

CategoryFarming Simulator 15
Created16.05.2015 18:10

Giuseppe Antista (peppe78) 16.05.2015 18:11
I have two joysticks in a mod with the lua SpeedJoystick.
I duplicated a file LUA and changed the name to have two rows and two joystick control. but it is as if they were connected, because it works only the last created and the original file does not create movement even if it is read and it works.


Martin Fabik (Hungar) 16.05.2015 21:02

have you changed xml patch to joystick in script? If you want two joysticks you must change xml patch in script (eg. old value is "vehicle.speedJoystick" - you could change it to "vehicle.speedJoystick2"), and change variable names in the script (eg. self.XXX to self.XXX1). I think that would work.

Regards, Martin Fabík

Giuseppe Antista (peppe78) 16.05.2015 21:50
Thank you for answering . I changed the name from " vehicle.speedJoystick to vehicle.speed2 but remains connected . I have not changed the variable SELF . Now I'll try and let you know. What are the variables ? Too many names begin with self .
some are or I changed self.motor speedjoystick ( changed self.motorjoistick2 but does not work )

Giuseppe Antista (peppe78) 16.05.2015 22:18
Ok .. good . Changed the names from self.sj1.node in and it works. But now I want to change the axis direction from axis_move_forward_vehicle steering left or right. What is the name of the axis ?.

Giuseppe Antista (peppe78) 16.05.2015 22:55
found ... here it is AXIS_MOVE_SIDE_VEHICLE ... thanks

Martin Fabik (Hungar) 16.05.2015 23:42
You must change name of every variable in self. is array (table) so you needn't to change name in this array ( can be changed to self.sj1.rotC). If you want, you can find more info about LUA scripting at youtube.

Martin Fabík

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