Max speed - Decrement

This forum is currently in read-only mode.
From the Asset Store
Support AdType ( AppOpenAd, Banner Ad, Interstitial Ad Rewarded Ad, MREC Ad) support c3 build service
  • On a collision to a wall with the Car Behavior, I wanted to lower the Max Speed on every collision.

    I tried On Collision between Car and Wall:

    Sprite[Car].MaxSpeed = Sprite[Car].MaxSpeed - 50

    Any help on how to make the car go slower with each collision?

  • Well your method is working ok. Just remember to use "On Bounce" and set wall attribute to "Solid"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have bounce to stop and wall to sold but i am not getting a decremented slowdown after each hit

  • Try the Car Behavior's "On Bounce" condition instead of On Collision.

    http://dl.dropbox.com/u/529356/car%20crash.cap

    On Collision checks for overlap between two sprites. It's basically the same as this:

    + Car is overlapping Wall
    + Trigger Once
        -> Do stuff
    [/code:1wnpf8de]
    
    Since the car is bouncing away from the wall before it's overlapping then you will never get On Collision to trigger.
    
    On Collision has been modified for other behaviors in the past though.  For instance, you can use On Collision with Physics objects to detect collision even though they don't overlap either.  You might want to make a feature request to have Car recognize On Collision in the same way, if it's important to you somehow.  Otherwise just use On Bounce.
  • OK I got this to work with:

    Car[Car].MaxSpeed -50

    The problem is I was using stop first (because I do not like the large bounce back), and with the car stopped touching the wall It subtracted the -50 untill I was unable to move

    I with bounce did not push you so far back. Is there a way to edit the amount of bounce?

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