Page 1 of 1

Add a method of getting the vehicle a character entity is in while the player is remotely driving

Posted: Mon Nov 04, 2024 9:40 pm
by asher_sky
I would love to have some way of knowing what vehicle the player character entity is in. When in remote view and remotely driving a vehicle, both player.vehicle and player.character.vehicle return the remotely driven vehicle, even if the character is in a different vehicle. It would be nice if player.vehicle returned the "active" (i.e., remotely driven) vehicle and character.vehicle returned the one the character entity is actually inside of.

Another option could be adding something like player.remote_vehicle and/or player.character_vehicle.

Thanks for considering :)

Re: Add a method of getting the vehicle a character entity is in while the player is remotely driving

Posted: Tue Nov 05, 2024 12:24 am
by asher_sky
...

I have just learned that despite the docs indicating that player.physical_vehicle is a MapPosition, it is in fact the vehicle entity that I want. doh

Re: Add a method of getting the vehicle a character entity is in while the player is remotely driving

Posted: Tue Nov 05, 2024 10:55 pm
by curiosity
There was also a bug that caused the character's vehicle to read wrong.

Re: Add a method of getting the vehicle a character entity is in while the player is remotely driving

Posted: Wed Nov 06, 2024 12:50 am
by asher_sky
Great! This one can get moved to "Already Exists" :)