How do I make this vehicle granting system work?

I’m making a game where you have to drive down the ramp and upon reaching the end, you will get tp’d to the start. I’ve just started making it and here’s a rough sketch of how its supposed to work

What I am having trouble figuring out though, is the car system and progression. This is how its supposed to work


But how do I allocate the correct 5 cars to each and every one in the lobby? I was thinking I maybe make a class? But idk how to proceed. Maybe tagging the first 5 cars as player1Cars and the second as player2Cars and so on? I just need some pointing in the right direction is all. Thanks a lot!

I’m assuming the player is mean’t to be always in a vehicle, in which case using the Assign Driver function instead of teleport would be ideal.

It may be able to work using a trigger for each car that when triggered by player exits vehicle, assigns the driver to the car, to keep them in the car.

the car swapping and driving is handled by each vehicles, assign driver, enable and disable vehicle functions, with respawn vehicle when enabled and destroy vehicle when disabled on.

The end of the ramp provides events using a sequence of maybe 4 “End triggers” that are only triggered by vehicles. the first trigger starts enabled and when triggered starts of a series of events that enables next vehicle, assigns player to driver of new vehicle, disables last vehicle, disables last car trigger, enables next car trigger, disables last End trigger, enables next End trigger.

The 5 vehicle spawners are close together, with only the 1st one enabled.

Let me know if you need more detail

but won’t the triggers at the end of the ramp be activated by every single player that reaches them? Won’t that change the car tier of players who haven’t yet reached the end?
I also had a new idea that I think might work, let me know what you think. So basically, I will make a new verse file/device for each column of cars, as shown below.

Then I can add the 5 car spawners as editables in the verse file and choose the entire player specific row in the editor. I’ll only have 8 player spawners in my game (players spawn at a completely different location and then can walk into a zone to get teleported to the main spawn area. Max players is 8). Upon a player spawning, I can assign the respective verse device to that player and store his agent in an empty variable, then I’ll disable the player spawner so that no other future player can spawn on this spawn-pad and register with its specific verse device (when the registered player leaves, I will re-enable it using the OnPlayerRemoved() function, so that new players can get vehicles). Once all these players have their specific rows assigned to them, they can begin playing, I think if this car assigning bit works, the rest should be pretty easy.

1 Like

Excellent, that sounds good.

1 Like