Due to increasing spam attacks, forum registrations are currently paused to keep our community safe and spam-free. Come hang out and stay connected with us on the SimHub Discord: https://discord.com/invite/nBBMuX7!

Catch you on Discord — and thanks for understanding!
Color binding for t...
 
Notifications
Clear all

Color binding for trackmap

1 Posts
1 Users
0 Reactions
803 Views
(@ehsanmomeni)
Eminent Member
Joined: 2 years ago
Posts: 9
Topic starter  

Hi,

I'm trying to color-code the sectors on the track map to show different colors depending on the best sector delta.

I've added the following to AlternateTrackSectorColor and TrackColor, but it doesn't seem to work. Either the whole track goes orchid or tomato. Is there a way to make it work or can't I use functions for the trackmap?

var sector = timespantoseconds($prop('IRacingExtraProperties.PreviousSector_0' + (repeatindex() - 1) + '_DeltaToBest'))

if (sector < 0) {
	return 'Orchid'
}

else {
	return 'Tomato'
}

   
Quote
Share: