Car Random Steering

Get help using Construct 2

Post » Fri Dec 30, 2011 12:53 am

Been away a while, but good to be back! Bought Construct 2, now that it finally has enough functions to develop a descent game.

Anyways, it is a bit different so to the point:

I want to use the Simulate car function to turn right and left a random amount. I am developing a AI movement system for a hovercraft type vehicle. (TOP DOWN) It scoots along in one direction for x seconds, then turns random angle degrees in a random direction, altering it's direction.

I had some success with Physics by applying impulse force at angles, but it was taking to many events to make accurate turns. Then I thought I would try the car function. But I can not get it to turn.

Here is what I was thinking (which does not work)

set speed 30
set vehicle_variable to random(3)

If vehicle_variable = 0 [simulate turn right]
If vehicle_variable = 1 [simulate turn left]

I've added extra switches to see if time is the issue, but cant seem to get it to work...   

Can someone direct me to a post that explains how this works, or maybe example CAP. You all have always come through for me with Classic... :>


Zetar
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Fri Dec 30, 2011 2:48 am

Last edited by Yann on Sun Sep 14, 2014 10:35 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Dec 30, 2011 3:00 am

You are a life Saver, Yann. - That answered a lot of my questions! I think I can tweak what you did here to do exactly what I want.   YOU ROCK!
B
192
S
6
G
7
Posts: 213
Reputation: 10,178


Return to How do I....?

Who is online

Users browsing this forum: 8tomo8, Governador, RookieDev, tarek2, Thelegendvinny and 19 guests