Page 1 of 1

LUA function to get the max tractive effort at current speed

Posted: Wed May 29, 2013 12:05 pm
by shanyiqua
Hi

Is there a way(a call) to get the max available tractive effort at the current speed of a locomotive in lua, that is easier than writing a code that opens the tractiveffortvsSpeed.dcsv file and reads from there?

Re: LUA function to get the max tractive effort at current speed

Posted: Fri May 31, 2013 1:18 pm
by shanyiqua
As i see it's another thing that's not possible in this game :(

Re: LUA function to get the max tractive effort at current speed

Posted: Fri May 31, 2013 7:56 pm
by metrobus
You can call the locomotives current speed by " Call("GetSpeed") " and its current tractive effort by " Call("GetTractiveEffort") ". Theres a more full list of all the available calls here http://forums.uktrainsim.com/viewtopic. ... a&start=15 although there have been a few more added since that list was created
regards
Edward

Re: LUA function to get the max tractive effort at current speed

Posted: Fri May 31, 2013 8:39 pm
by shanyiqua
I can get the current tractive effort with "Accelerometer" control value too, but i need the current MAX available tractive effort.

Re: LUA function to get the max tractive effort at current speed

Posted: Fri May 31, 2013 10:24 pm
by metrobus
Don't think that's at all possible
Edward

Re: LUA function to get the max tractive effort at current speed

Posted: Fri May 31, 2013 10:26 pm
by DaveDewhurst
If you only have a manageable amount of points in your csv file t wouldn't take too much just to have them stored in the script would it?

Dave