How do I create a car driving game using 8 directions where the car turns only in crossings?

0 favourites
  • 9 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • If I press the down/up arrow in the middle of the street, the cars turn to left/right instead of going up or down the street (that I have to use to dodge the other cars). I want the car only turn to the left/right when it is trespassing a crossing. Is it possible?

    Thanks

  • dop2000: Could you please help me with this problem?

  • I don't really understand how your game is supposed to work. You need to post your project, or maybe a youtube video of a similar game.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't really understand how your game is supposed to work. You need to post your project, or maybe a youtube video of a similar game.

    Thanks for replying!

    Sorry. I don't started the game yet. I am just doing some tests to check if it's possible.

    This is what happens when I press the UP and DOWN keys in the middle of the street or if I disabled de angle in the behavior.

    I need the car go up and down the street and only turn to left or right with it is over the crossing. Like this:

  • Making the car to only turn on intersections is easy - just put an invisible square sprite there and ignore left/right keys if the car is not overlapping it.

    But if you want the car to make a naturally looking 90-degree turn and enter its lane properly - this part may be tricky.

  • Making the car to only turn on intersections is easy - just put an invisible square sprite there and ignore left/right keys if the car is not overlapping it.

    But if you want the car to make a naturally looking 90-degree turn and enter its lane properly - this part may be tricky.

    I already intended to use a sprite to check the keys in the crossing. Actually, the problem is that I cannot have the two options: turn (to right/left or left/right) and go (up/down or left/right) in the middle of the streets to dodge the other cars.

    If I could disable/enable angle in this behavior using event commands, I will solve my problem, but I can't.

  • I figure out how to solve this problem: I configured the angle of the 8 directions behavior to "No" and I included another 8 directions and configured the angle of this behavior to "Smooth" and disabled it. when the car overlapping the sprite on the crossing, I disable the 1st one and enable the other and vice versa when the car is not over the crossing. Thanks anyway for try to help me.

  • That's a clever solution! Much easier than what I had in mind.

  • That's a clever solution! Much easier than what I had in mind.

    Thank you!

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