Announcement

Collapse
No announcement yet.

Help! How do i determine multiplayer racing position?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help! How do i determine multiplayer racing position?

    I have been stuck on this problem for a few days, any help would be appreciated!

    I added a spline system, determining the position of the player along the spline.
    The first attachment below shows the player (Host) is 0.16% of completing the track(spline).
    The second player is the connected client showing at 0.065% of completing the track.
    The variable shown in the hud is replicated through the player state

    My question is how do I go about calculating the player's position based on their percentage? For example, the player with the most percentage completed would be in 1st place and so on. I can't seem to figure out how to compare all the connected player's variables.
    Attached Files
    Last edited by Lipton Ice T; 11-20-2019, 07:52 PM.

    #2
    Update: I have tried getting the playerarray from gamestate and therefore setting the index into an array

    I then used a simple check to see if host is behind connected client, if so a printed message saying player has passed you. Im not sure if im doing this right

    Help

    Click image for larger version

Name:	Capture1.PNG
Views:	46
Size:	68.8 KB
ID:	1689840Click image for larger version

Name:	Capture2.PNG
Views:	55
Size:	61.0 KB
ID:	1689839

    Comment

    Working...
    X