Iracing - lapped ca...
 
Notifications
Clear all

Iracing - lapped car

13 Posts
2 Users
0 Reactions
6,547 Views
(@nirat)
Active Member
Joined: 4 years 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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

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)
Active Member
Joined: 4 years 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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

@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)
Active Member
Joined: 4 years ago
Posts: 10
Topic starter  

@romainrob

It seems to work!

Still little issues, but fine in general - thanks!


   
ReplyQuote
(@nirat)
Active Member
Joined: 4 years 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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

@niratΒ 
Hi,
Use the computed value instead


   
ReplyQuote
(@nirat)
Active Member
Joined: 4 years 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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

@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)
Active Member
Joined: 4 years 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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

@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)
Active Member
Joined: 4 years 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)
Honorable Member
Joined: 5 years ago
Posts: 530
 

@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: