Hi guys, I am making a game for fun and I want to know how to get into a car!, I want to know whats the best way about doing this - I dont need it to be a fancy climb into the car, Just basically teleport in (Its easier, Right?)! So I want it to be when your near a car and press enter, You spawn in the car and can drive the car.(I know how to do the Near And Keyboard!)
Also I need to know how to change the logic bricks so that when I’m in the car, Its the cars logic, Not the characters.
Properties. When Player enters car, make an [“ACTIVE”] Property for him False, and at the same Time make the such a Property within the Logic of the Car True. The Property would be connected to the Movement of either Object, so while the Object is inactive it could not be moved. Easier to achieve when you are ursing Python (less Conncections needed).
Expectin’ your Player has Boolean active and your Car as well:
Put all the Movement (which might be easy to adapt if you know some Basics) into an if Command:
if player["active"] == True:
Do that for the Car as well.
As soon as the Car is entered, change the Properties and that should be all.
(Of Course, you do not necessarily need Python for it. You also can connect the Property to all the Controllers that control the Motion Actions et cetera, but that might become a Hassle depending on how complex the Movement Bricks are.)
I could even give you a set of logic bricks that can do this… I think.
Have an animation open the car door, and force the protagonist in. Use logic and Boolean properties, logic to play animations based on triggers, and properties so the character enters on True, and Leaves on False… or something similar.
The problem with my idea is that you have to get the character to be in a certain spot to enter the car, or he’d float inside or be stuck outside. Could a constrain location actuator (used with the car as a reference point, with local coordinates) put the character in the right spot? May be a good idea to try, but plan on a bit of experimentation.