Have a car react to the surface it's driving on

0 favourites
  • 3 posts
From the Asset Store
296 high-quality footsteps sounds specially crafted to help you put sound to your games
  • I'm trying to create a top down rally racing game. The car is supposed to react to the type of terrain it is currently driving on, which means that driving over sand will have a greater performance penalty than driving over rocks. I have tried working with the collision and overlapping features in the event sheet, but without any luck.

    I'm not a programmer, so I really don't know where to look. I also tried using instance variables, although I think they're not meant for this.

    Any help or tips would be highly appreciated!

    Mathijs

  • Hi Mathijs90 - Overlapping should do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your reply

    I've tried, but I think the problem is that it has to change relatively to the original value. I've tried testing this by having the value multiply by 0.5. This is because the player will be able to install upgrades to his car, which means the original value is not always the same. Therefor it is impossible to change this value to a definite number, when the overlapping takes place.

    I.e.. Say the player upgraded his car's max speed from 100 to 150. And he would then drive this car over a patch of sand. If the overlapping changes the max speed value to 50, it would be half of the original value, but only a third of the upgraded value. Therefor it would not matter to the player whether he had upgraded his max speed or not, which would kill the entire upgrading system. This is why the changes made must be relative, and not absolute.

    Also the value must be restored once the car is no longer overlapping the patch of sand.

    I could send you the .capx link in a PM, so you can have a better look at it.

    Edit: I cannot link the file in a comment since you need at least 300 rep to be able to do this. A link through PM requires at least 500, so that won't be possible either.

    Edit: Edit: Yaaay, 300 rep! Here's a dropbox link to the .capx file: https://dl.dropboxusercontent.com/u/48511605/GO4Dakar_BasicPhysics.capx

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