Iracing - lapped ca...
 
Notifications
Clear all

Iracing - lapped car


nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

IRacing

Guys, how can I get info if certain car is in the same lap as me or not? Immediately - not on start/finish line - like it works with relative positions in black box.

Trying to implement color indication of lapped cars (like blue/red relative in iracing). Can't find appropriate property.


Quote
Romainrob
(@romainrob)
Estimable Member
Joined: 2 years ago
Posts: 249
 

Hi.
Try using the gap value from the tracker. PersistantTrackerPlugin.DriverAhead_XX_Gap
And compare it to your best lap time. DataCorePlugin.GameData.BestLapTime

Something like this:
Gap / Best > 0.5
Gap / Best < 0.5


ReplyQuote
nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

@romainrob

Thanks for reply, but I don't get the idea. 

PersistantTrackerPlugin.DriverAhead_XX_Gap shows actual gap without lapping (I checked 🙂 ), so lapped car just in front of me will have gap of lets say 1 sec. How comparing it to best time can show me lapping?

Am I missing something?


ReplyQuote
Romainrob
(@romainrob)
Estimable Member
Joined: 2 years ago
Posts: 249
 

@nirat
Hi,
I think this function gives the total gap: drivergaptoplayer(raceposition)
Maybe that's what I was using. I can't remember for sure.


ReplyQuote
nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

@romainrob

It seems to work!

Still little issues, but fine in general - thanks!


ReplyQuote
nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

@romainrob

Can you help me again please?

How can I pass [iRacingExtraProperties.iRacing_DriverAhead_00_ClassColor] (or other color) to color of element background?

Computed color is not very helpful because then I have to list possible colors etc. I want just to pass iracing color straight to text background color.


ReplyQuote
Romainrob
(@romainrob)
Estimable Member
Joined: 2 years ago
Posts: 249
 

@nirat 
Hi,
Use the computed value instead


ReplyQuote
nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

@romainrob 

Thanks for reply, mate!

It was first that came to my mind. But it doesn't work for some reason. I mean it shows colour number in raw (and number changes in game if I put it to text - just to check - so it works on IRacing side), but it doesn't affect bg colour. Looks like smth is missing like colour conversion of some kind.


ReplyQuote
Romainrob
(@romainrob)
Estimable Member
Joined: 2 years ago
Posts: 249
 

@nirat
The format is correct.
This is how I use these color properties.
Did you reload your dash after saving?
Depending on how/where it's loaded this can be necessary.


ReplyQuote
nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

@romainrob 

It is format by the end. At first I didn't pay attention, but

[iRacingExtraProperties.iRacing_DriverAhead_00_ClassColor]

 gives color like this

0x33ceff

So to make it work I have to do the following

'#'+right([iRacingExtraProperties.iRacing_DriverAhead_00_ClassColor], 0, 6)

ReplyQuote
Romainrob
(@romainrob)
Estimable Member
Joined: 2 years ago
Posts: 249
 

@nirat Hi, it shouldn't.
Maybe it did on older versions.
Look at this prop: IRacingExtraProperties.PluginVersion
The current version in 2.0.3
Available here: https://www.simhubdash.com/community-2/postid/1671


ReplyQuote
nirat
(@nirat)
Active Member
Joined: 1 year ago
Posts: 10
Topic starter  

@romainrob 

Heh, the only version property I can find is IRacingExtraProperties.UniversalSimHubDashforIracing.CurrentVersion - 1.52

I guess it's pretty old. 🙂 I never updated it honestly - SimHub only - thought it's enough.

So to update it I just replace Romainrob.iRacingExtraProperties.dll in C:\Program Files (x86)\SimHub?


ReplyQuote
Romainrob
(@romainrob)
Estimable Member
Joined: 2 years ago
Posts: 249
 

@nirat 
Yes, overwrite the dll to update the plugin.
If you use some of my dash or other plugins, use the installer instead.


ReplyQuote
Share: