Car Random Steering

0 favourites
  • 3 posts
From the Asset Store
Random Maze Generator with Door & Key System - tutorial capx
  • Been away a while, but good to be back! Bought Construct 2, now that it finally has enough functions to develop a descent game. <img src="smileys/smiley32.gif" border="0" align="middle" /> <img src="smileys/smiley32.gif" border="0" align="middle" />

    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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • wandering.capx

  • 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! <img src="smileys/smiley20.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)