LUA function to get the max tractive effort at current speed

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

Locked
shanyiqua
Been on the forums for a while
Posts: 262
Joined: Tue Dec 20, 2011 11:48 am

LUA function to get the max tractive effort at current speed

Post 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?
shanyiqua
Been on the forums for a while
Posts: 262
Joined: Tue Dec 20, 2011 11:48 am

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

Post by shanyiqua »

As i see it's another thing that's not possible in this game :(
User avatar
metrobus
Very Active Forum Member
Posts: 1283
Joined: Fri Mar 28, 2008 7:55 am

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

Post 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
shanyiqua
Been on the forums for a while
Posts: 262
Joined: Tue Dec 20, 2011 11:48 am

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

Post by shanyiqua »

I can get the current tractive effort with "Accelerometer" control value too, but i need the current MAX available tractive effort.
User avatar
metrobus
Very Active Forum Member
Posts: 1283
Joined: Fri Mar 28, 2008 7:55 am

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

Post by metrobus »

Don't think that's at all possible
Edward
User avatar
DaveDewhurst
Very Active Forum Member
Posts: 1994
Joined: Wed Nov 28, 2007 10:21 am
Location: Birkenhead
Contact:

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

Post 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
Locked

Return to “[TS] General Discussion”