Suggestion: Player switch

I came here to suggest a system to switch the controlled 3D character or vehicle (and 2D objects in 2D games). Any objects could have player behavior, while a separate control layer/controller would determine which one is being controlled at the moment through events. It With this controller switch, the games could switch players without bugs.

In my case, I want to switch between different cars during gameplay. Each car can have different properties, but there is currently no simple way to change which car receives the Player controls without creating workarounds.

Just to be clear, there shouldn’t be a workaround needed to have multiple potential controllable objects.

Add them all to a group, add the behaviors for your player controls (which even if custom you should be making a behavior for a lot of control logic), add a boolean group variable so you can set it to true/false when you want, then use that to set the behavior to true/false based off whichever is enabled for the player.

That’s generally how it works in most engines, you have your controls set up on whatever you could potentially control, and have a variable or something to identify which one should be controllable, turning it off on anything that isn’t. That’s not a workaround.

I didn’t think about that. Is it possible to just assign 3D car behavior to them, put them in a group, create a boolean variable representing each one, and then control the car in the program that has the true variable? Is it really possible to do this in programming? Like, if variable x is true, switch control to player x?

If i remember correctly you have action to set controls for your object
There is even behavior remapper allowing you to set different keys instead of default controls

You make text variable call it CurrentPlayer
Make event that if you want to select a car you set for all controls to NOTHING

And below it
CurrentPlayer = RedCar
Here you set which keys should control RedCar

CurrentPlayer = YellowCar
Here you set which keys should control YellowCar

And so go on

Thank you. I thought this would only be possible with the help of a new update.