Best Lap Delta
 
Notifications
Clear all

Best Lap Delta

4 Posts
3 Users
0 Likes
2,972 Views
(@dropkicks17)
New Member
Joined: 3 years ago
Posts: 4
Topic starter  

Is there a way to change the color of the Best Lap Delta when it is positive or negative?


   
Quote
(@dropkicks17)
New Member
Joined: 3 years ago
Posts: 4
Topic starter  

To clarify...
I would like the Delta Time to be displayed in GREEN when I'm beating the delta and Red when I am behind my delta. I hope you understand what I'm trying to ask how to do. Thanks!


   
ReplyQuote
(@jongen)
Active Member
Joined: 3 years ago
Posts: 7
 

Hi! I'm not affiliated at all, and this is a bit of an old postt, but there is. You need to call the sign function.

 

For example,

if(sign([PersistantTrackerPlugin.AllTimeBestLiveDeltaSeconds])=1,2,3)

 

Replace the property in brackets with anything you would like.

The logic is this: If the sign of the delta is positive, return color value 2 (which, below, you'd want to color red). Otherwise, return value 3 (which you would want to color green). No middle color is necessary.


   
ReplyQuote
(@diablo_rf)
New Member
Joined: 7 months ago
Posts: 1
 

@jongen It doesn't work on my side. No matter the delta is positive or negative, the color of the text is always green
Here is my code:

if(sign([PersistantTrackerPlugin.SessionBestLiveDeltaSeconds]) = '', 'red', 'green')

I'm adding this to the TextColor function for LiveDeltaToBestText

 

Any thoughts?

This post was modified 7 months ago 2 times by Diablo_rf

   
ReplyQuote
Share: