Skip to content
AppgineeringAppgineering
Shop
Read-only8 posts · 4,735 views · Started 01 Jun 2020, 14:59

Script code for P2P

Archived: discussion moved to DiscordDiscord
Lukas R.Original poster
#1

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 ThissenAppgineering
#2

Movement.PushToPassCount
Movement.PushToPassActive

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

#3

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?

#5

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 ThissenAppgineering
#6

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

#7

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

#8

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.

This thread is archived.

New replies have moved to Discord.

Continue on Discord