Game Development Community

Mounting a Vehicle

by Samuel Harper · in Technical Issues · 09/28/2006 (1:11 pm) · 2 replies

Is there a resource that would help me with this issue -

I'd like for my player to be able to get into a vehicle and drive - then get back out and still run around.

I did some searching and couldn't find anything.

Thanks!
Sam

#1
09/28/2006 (1:17 pm)
Where did you search?
and what did you search for?

I am sure Each vehicle tutorial covers the importance of the mounted tag variable on the car.

if you do a dump on the car object, you will see a tag variable titled: mountable or mounted.
one of the two.

if this flag is not set properly you will not be mounting the vehicle.
this is the one variable everyone stumbles on when wanting to mount a car.

note the collision script code for your player.
here there is a test checking if this variable has value.
and if so then a mount can occur.
if this variable is 0 then you cannot mount it.

when entering the vehicle (single seater) you should be setting it to false. so noone can steal it from you
while you are driving it.
then when you get out, you set it back to true so you can get back in.
#2
09/28/2006 (2:14 pm)
Thanks Badguy
I did not search for Vehicle Tutorial - which I just now did - and found some good resources.

Thanks!