nzso's Forum Posts

  • [quote:19l9tmek]+ On bounce

    -> car: Set speed to Abs(expression for get speed) - n * TimeDelta

    This is something I tried and works perfectly with just the right values. The only problem with this method (and I thought this may happen when thinking about it) is collisions with anything but a "moving" ai car will cause the player car to continually accelerate towards a wall or any other soild and will at times cause the player car to become stuck against a solid object.

    Edit: Also, using this method if the car is hits a wall or other solid object when in reverse the car will shoot forward in speed.

  • this is probably a useless hint,but with some work u could get a decent car movement with physics behavior. i once tried to do it,and almost managed,but i couldnt figure out how to make proper steering..(i could only steer/turn when accelerating,didnt find any way to make it right. mind you though,im just a beginner,im sure someone with more experience could pull it off)

    That's a option I considered but for now I am trying to keep things simple enough without becoming to dull. I am still playing with all the options though so I may start looking at some physics behavior in the near future.

  • I would love to give you an exact example, but I don't have a pc to work with Construct for quite a while.

    But you really don't need another behavior, just use events that take over control as soon as the car behavior needs tweaks.

    Your idea is what I would do, too. Adjusting the speed, via 'Set speed'. Do it over time (n * TimeDelta). And keep in mind, that when bouncing, all values are expressed negative. If you don't want the car to go backwards, but rather slow down against zero, just reverse 'Get Speed' with abs() in the 'on bounce'-event.

    + On bounce

    -> car: Set speed to Abs(expression for get speed) - n * TimeDelta

    n being pixels per second, e.g. 'Get deceleration'

    This would decelerate linear and only when bouncing, making sense only when hitting another car for several ticks. It's just a simple approach to point to the right direction. For more detail I would need to work with Construct. I'm sorry.

    No problem, any help at all written or example form is helpful especially since I am attempting to slowly learn the functions and methods used within Construct. Getting used to the interface, available functions etc. is going to take some time. Thanks for the help tulamide.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just tested the on bounce trigger by adding stop when the action is triggered but unfortunately coming to a complete stop is not really what i am shooting for. When the car is going around the track and hits the backend of an ai opponent I am trying to more or less cancel the bounce action out from the player controlled car (slightly reducing speed) and then causing the ai opponent to "bounce" slightly from impact. My first step though is trying to get rid of the bounce effect on the player controlled car.

  • The car behavior is rather limited in the points you mentioned. But there's a trigger, 'on bounce', it will be triggered once, exactly after a collision. I used it to get rid of bouncing, by using the action 'stop', in Verve!.

    You could use the trigger to dampen the bouncing. Also, decceleration is quite possible.

    When the car drives backwards, the velocity is expressed negative. Just create a condition that checks for velocity < 0, and dampen the velocity in some way, e.g. velocity = velocity - velocity * TimeDelta, or whatever is to your likings.

    Much appreciated tulamide. I had noticed the "on bounce" trigger and did in fact play with it for awhile hoping to cancel out the bounce by adjusting the speed of the vehicle when compared to it's relevant speed but didn't get a chance yet to really play around with that idea. I am assuming that in order to apply a deceleration system to the car I will have to do this by adding a custom movement behavior to the vehicle on top of the car movement behavior? I was just hoping that by doing so there would be no conflicts by adding more than one behavior.

    I would be interested to know how you might go about dampening the bounce effect through the on bounce trigger. An interesting idea, I will have to play around with it.

  • After some searching I did find this example

    http://dl.dropbox.com/u/1646976/GP2.cap

    The custom movement in Layout 2 is nowhere near the feel of the included behavior and there is still no deacceleration when going in reverse. It's truly a shame these two options where not made editable in the included Car Movement behavior.

  • Hi, I just started playing around with construct a few days ago and come from a small background in scripting/programming. I have begun work on a top down F1 racer project and now that I have finished the track tiles and ground textures and assembled the first track I am starting to play with vehicle movement. The included "Car Movement" behavior is perfect but with two problems. It seems as though I am unable to edit or disable the bounce effect when colliding with solid objects as this is way to powerful. Also there seems to be no deacceleration function when going in reverse or after a collision.

    Are these to functions able to be added/edited by adding a custom movement behavior along with the Car movement behavior or am I going to have to make my own customized movement behavior?

    If I am going to have to create a Custom Movement Behavior from scratch can anyone point me in the right direction on how to achieve the feel of the already included Car Movement behavior but with the option to edit or disable the bounce feature as well as a editable deacceleration feature (When going in reverse)?

    Much thanks in advance for any and all suggestions/help!