Iracing - lapped car
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.
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
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?
I think this function gives the total gap: drivergaptoplayer(raceposition)
Maybe that's what I was using. I can't remember for sure.
It seems to work!
Still little issues, but fine in general - thanks!
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.
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.
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.
It is format by the end. At first I didn't pay attention, but
gives color like this
So to make it work I have to do the following
'#'+right([iRacingExtraProperties.iRacing_DriverAhead_00_ClassColor], 0, 6)
@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
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?
Yes, overwrite the dll to update the plugin.
If you use some of my dash or other plugins, use the installer instead.