Dynamic class color...
 
Notifications
Clear all

Dynamic class colors based on vehicle class presence / static class list

1 Posts
1 Users
0 Reactions
1,856 Views
(@thoraxe)
New Member
Joined: 3 years ago
Posts: 1
Topic starter  

I did some quick searching and didn't really see any existing examples.

In the series I race with there are 4 classes: GTE-Am, GTE-Pro, LMH-Am, LMH-Pro. I don't want to hard-code these for colors if I can avoid it.

I'd like for each unique value to get its own color. I'm wondering if there's a way to dynamically figure out how many classes are present and then pick a color for a unique value? Looking at the available attributes, the PersistantTrackerPlugin only has the classes for the 5 drivers ahead and the 5 drivers behind. Since it's possible for the list of classes around you to change while driving, trying to do something dynamically off of these values would result in the colors constantly changing.

I'd need for the PersistantTrackerPlugin (or some other plugin) to keep track of all the unique classes present in the session and handle that dynamically. But my guess is I'll just have to deal with hard-coding for my particular case...


   
Quote
Share: