Script code for P2P

Posts: 53
I'm trying to put together a small script to show a small icon when a driver uses P2P. So I need to check, whether P2P is active, but I can't find under which script path it's hidden?

I mean, when I check the pits, I use:
if (car.Entity.Car.Movement.IsInPits == true)


How do I check whether the car uses P2P?

Thanks!
Posts: 785
Movement.PushToPassCount
Movement.PushToPassActive

Although I have heard there could be a bug in the SDK with these values.
Posts: 53
Thank you! I'll give it a shot and report back on that.

Also, does that mean there could be reliability issues even if I use it through the editor's Data Bindings?
Edited (1 time)
Posts: 785
Yes, the bindings use the same data.
Posts: 53
Just did some testing and while P2P Count works, P2P Active seems to be giving only "FALSE". Very interesting, so there are really some issues then.
Posts: 785
I have tested it and pretty sure it was working for my own car at least. But there is some delay in the data.
Posts: 53
Fixed now, it's all working well! It feels a bit faster when in a spectator mode, due to the sync, luckily.
Posts: 53
Ok, so I've finally got to test this feature with our drivers on a bigger multiplayer server. That delay is interesting. Speed, gears, and P2P Count works without almost any delay. But the 'Active' check is unreliable and when it works, the delay is massive, from 6 to 12 seconds.

I'm thinking of a workaround using the 'Count' - whenever it gets +1, I'd show a pop-up graphics for a certain amount of time.