Getting in and out of vehicles?

Get help using Construct 2

Post » Sun Nov 18, 2012 6:39 am

Hello,

What I ultimately wish to do is allow the player to gain control of a vehicle at certain times during the course of playing a layout. Essentially, the player 'gets in' the vehicle and then can drive the vehicle for a period of time, and once that period of time expires, the player is then ejected from the vehicle.

The problem I am having is switching control and making it so that the player can control the vehicle instead of just the normal person sprite. Any tips on how to go about doing this would be greatly appreciated. Thank you!
B
19
S
6
G
5
Posts: 98
Reputation: 4,484

Post » Sun Nov 18, 2012 7:11 am

Say you're using the 8-direction controls for the player and the Car movement for the vehicle:

There should be an option to disable the controls (Set Enabled), so you could do something like this:

On Player collision with vehicle (or press key etc)
-----> Set player invisible
-----> Disable 8-direction
-----> Enable Car movement

On ejected
-----> Set player position to vehicle
-----> Set player visible
-----> Disable Car movement
-----> Enable 8-Direction movement
B
9
S
2
G
3
Posts: 75
Reputation: 1,964

Post » Sun Nov 18, 2012 8:56 pm

Alright, I shall give that a shot. Thank you :)
B
19
S
6
G
5
Posts: 98
Reputation: 4,484


Return to How do I....?

Who is online

Users browsing this forum: luckyrawatlucky, mindragon73 and 23 guests