How do I Enter/Exit Vehicles (Solved)

Get help using Construct 2

Post » Thu Dec 11, 2014 8:31 pm

However you may have the same issue as me, which is that on entering the vehicle the exit conditions are immediately filled and the player 'exits' again.

Sorry to bomb your thread btw, but as we're trying to do the same thing it seemed extraneous to create another.

Anyway this is one example of how I was trying to do it, If I disable the exit portion of the script then the guy 'enters' the vehicle and I can control it. I've got no idea how to handle exiting the vehicle though!

Image
B
7
S
1
Posts: 27
Reputation: 511

Post » Thu Dec 11, 2014 9:35 pm

This is one way to do it. Not the best example but you can clean it up a bit. Just wanted to show you guys the concept :)

I choose to hide the player and not pin him to the car. I just move the player to the cars front door position when exiting the car.

In a bigger game I would use functions instead so you don't have to do the same events over and over again with different cars.

And just like ForgedByHand said. You can't add "on collision" as a condition to "on e pressed" because both are triggers. You have to check for "is overlapping" wich works as a condition for a trigger event.
You do not have the required permissions to view the files attached to this post.
Last edited by Anonnymitet on Fri Dec 12, 2014 1:29 am, edited 1 time in total.
B
58
S
24
G
14
Posts: 775
Reputation: 13,166

Post » Thu Dec 11, 2014 10:32 pm

this is what I have been looking for :D and the trigger was the key. (Like your art LOL)

Now if you can help me figure out my trailer issue I can move forward with my game.
B
8
S
1
Posts: 74
Reputation: 725

Post » Thu Dec 11, 2014 10:49 pm

Glad it helped.

I know my art is top notch, only took me a few hours to create the player and the car ;)

So what is the problem with the trailer?
B
58
S
24
G
14
Posts: 775
Reputation: 13,166

Post » Thu Dec 11, 2014 11:47 pm

here is the capx file with the trailer, what I am trying to do is set up a hook up between tractor image point "hitch" and trailer image point "hitch" and when i drive around, i want it to feel like a trailer:


turning, pulling, backing up, and later i will add weight depending on how much is loaded in it, to get the pulling feeling. but right now I just need the hook up and trailer to turn with the tractor/ backing up,
You do not have the required permissions to view the files attached to this post.
B
8
S
1
Posts: 74
Reputation: 725

Post » Fri Dec 12, 2014 12:51 am

Here is a better version that is cleaned up in the code.

WASD to move, E to enter/Exit tracter
You do not have the required permissions to view the files attached to this post.
B
8
S
1
Posts: 74
Reputation: 725

Previous

Return to How do I....?

Who is online

Users browsing this forum: Congrats2u and 26 guests