ATVO by Appgineering
Download
Read-only

Script code for P2P

8 posts 4,735 views Started 01 Jun 2020, 14:59
Showing 1–8 of 8 posts
Lukas R.
Original poster

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!

Nick Thissen Appgineering
Reply #1

Movement.PushToPassCount
Movement.PushToPassActive

Although I have heard there could be a bug in the SDK with these values.

Lukas R.
Reply #2
· edited

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?

Lukas R.
Reply #4

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.

Nick Thissen Appgineering
Reply #5

I have tested it and pretty sure it was working for my own car at least. But there is some delay in the data.

Lukas R.
Reply #6

Fixed now, it's all working well! It feels a bit faster when in a spectator mode, due to the sync, luckily.

Lukas R.
Reply #7

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.

Archive · Read-only

New replies have moved to Discord.