Display Engine speed (RPM)

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
Phenom
Posts: 63
Joined: 28 Feb 2014, 23:54

Display Engine speed (RPM)

Post by Phenom »

Hi all !

I've started to create a custom mania-script which should display speed engine rotation (RPM). I don't know exactly which Context I should use to retrieve this data. Is it CAudioSoundEngine context (since it contains a float called RPM) ?

I'm not sure it should be this context, since it seems to be associated to the Sound system. Is there another one to use, dedicated to the Car information ?

Thanks for answering ! :pil
Creator of Lerya
Race graphic viewer for TrackMania²
More information on http://www.lerya.org
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: Display Engine speed (RPM)

Post by Eole »

Hi,

You can't access the RPM of the engine from a script. The only informations you can get about the car are in the CTmMlPlayer class (speed, distance, position, ...).
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
User avatar
Phenom
Posts: 63
Joined: 28 Feb 2014, 23:54

Re: Display Engine speed (RPM)

Post by Phenom »

Ok thanks for answering !
Creator of Lerya
Race graphic viewer for TrackMania²
More information on http://www.lerya.org
User avatar
TMarc
Posts: 15255
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: Display Engine speed (RPM)

Post by TMarc »

Could the RPM be calculated from the speed?
I guess the ration RM vs. Speed is different, depending on the title (Canyon, Valley, Stadium), but if the forumla was known... ?
User avatar
Phenom
Posts: 63
Joined: 28 Feb 2014, 23:54

Re: Display Engine speed (RPM)

Post by Phenom »

No. Since you can be full throttle and be blocked, the car speed is 0.
Creator of Lerya
Race graphic viewer for TrackMania²
More information on http://www.lerya.org
User avatar
TMarc
Posts: 15255
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: Display Engine speed (RPM)

Post by TMarc »

good point, right. :?
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest