ID:265403
 
Im creating a Vehicle system. I wanted some input on.

When you get in the car..should your mob be switched to the car, and the Player mob of you set to a null loc?

Or should I just set the mob invisible, and make them move along with car?

Or does anyone else have some ideas?
usr.icon = 'car.dmi'


just change the players icon :)

-_->O-matic<-
ITG Master wrote:
When you get in the car..should your mob be switched to the car, and the Player mob of you set to a null loc?

Change client.mob to the car. :p And, when they get out, just set them to an open a space near the car.
Turn the /mob/player into the /mob/car. Then when you get out just make a new /mob/car in the /mob/players loc.

Edit* Also, don't forget to delete the /mob/car when you change the /mob/player into it. :p
I usually put the mob in the vehicle's contents, and then set then change the move procedure of the player so that if they are in a vehicle, it will try to move the vehicle.
In response to O-matic
@ O-Matic or whatever.
_> No.

I'm going more in depth with this..

@ Everyone else
Good ideas.
In response to Ter13
Ter13 wrote:
I usually put the mob in the vehicle's contents, and then set then change the move procedure of the player so that if they are in a vehicle, it will try to move the vehicle.

If I may interject my two-cents, I believe making use of the tools Byond provides to us for this purpose is the way to go. As Ter13 says, relocating the player's character mob into the car object is the way to go.

However, I don't quite agree with altering Move to move the car object instead, but rather setting client.mob to the car as Hell Ramen suggested. That is, unless the car is realistic, including scale, (or for some other reason) forcing you to alter movement beyond that, then you might as well alter the car's Move function as appropriate and alter client.Move to send it the required information.

The different information might include giving the car.Move parameters for acceleration and turning instead of actual location and direction, though I usually prefer to make a new function to handle custom movement capabilities and leave Move to its default setup.