How do I accelerate a car to full speed

Get help using Construct 2

Post » Fri Mar 20, 2015 12:11 am

The player in my game is a vehicle that drives similar to a car which is why I used the car behavior. I made several buttons to select different speeds. I press the button and the vehicle goes to the speed I put in the event instantly instead of accelerating to the speed. The event action ignores the acceleration speed in the properties window of the vehicle. If I use the arrow keys the vehicle accelerates properly.

How do I tell the player vehicle to accelerate to the set speed over time with the press of a button? I tried searching for this in the forums and found things similar to my problem but not the same. I'm new here so please forgive me I'm not trying to be lazy, lol.
Posts: 3
Reputation: 231

Post » Fri Mar 20, 2015 12:16 am

Set an instance variable TargetSpeed. Then if Speed < TargetSpeed, Speed = speed + Acceleration*dt
Posts: 189
Reputation: 1,536

Return to How do I....?

Who is online

Users browsing this forum: ghzmxls, guannstar and 16 guests