GTA style

I´m making a GTA style game. But I got a problem, I don´t know how to get the guy you are playing to jump into the car!

Please help!

A tutorial woud be good

The game engine works by layering many simple parts into complex systems. Learn the simple bits first and you’ll be able to figure out how to assemble the systems yourself.

First, get your car logic set up so it can be driven around (even if the car is just a cube). Next, get your character set up so they can walk around. Now the really useful part: learn to use “states”. A quick search will likely find you a good tutorial on this.

After that you’ll be able to understand the following:

It’s a simple case of when the character collides with the car / pushes a certain key, switching their state so they’re not visible and don’t detect keyboard commands, while at the same time switching the car to a state where you can control it. Later switch those states back when the character gets out of the car.

Good luck!

Thak you!!!

But how to make the guy shoot? but I dont mean he is gonna shoot balls I already know how to do that.And how shoud I do to make the guy JUMP into the car.’

When I use states the guy just stop moving and the car starts driving

I suppose you could parent him to the car, then unparent him when he gets out.

Read the first 2 sentences of post 2…

I think as a beginner your working on something way to ambitious, something seen a lot around here, most more advanced users on this forum wouldn’t attempt what your trying.
Start off simple and learn the basics.

just a few links where you find what you are looking for


It seems that LostInSpace was just nice enough to write a nice tutorial on states over at:

Notice though that I recommended learning this after learning to move your car / player around first. You’ll learn the later steps are much faster to learn when you learn the easy steps first.