car slows on grass help

ktfrightktfright Member Posts: 964
edited November -1 in Working with GS (Mac)
okay, i'm acting so N00B today, plus i should have been figured this out by now, but, what is a good way to get my car actor to slow a little bit when it goes off the track, and i mean can i make something that when the car actor goes over the other actor, it slows down a bit.

(my track is one image, so the actor slowing down the car is going to be invisible and everywhere except the track)

thnx

Comments

  • SDMGSDMG Member Posts: 280
    Hi ktfright,

    can't you use an collision event ? if your car collides with your invisible actor you enable a drag-behaviour to slow down your car?
    (maybee with a timer on the drag behaviour that destroys itself to not completly stop the car)

    just an idea...

    cheers

    SDMG
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    friction on a grass actor maybe?
  • ktfrightktfright Member Posts: 964
    nope, nothing is working so far
  • JGary321JGary321 Member Posts: 1,246
    You can't do this unless you make the grass a separate actor. Make it so when car collides with actor speed = xxx. And make sure to select the options that allow the car to 'pass over', not just run into the grass.
  • ktfrightktfright Member Posts: 964
    Should I edit the max speed? And how could I try to make it revert back to regular speed, would I need to make another attribute?
  • KamazarKamazar Member Posts: 287
    Alright, I'll try to help. I'm guessing you want the grass to behave as it usually does in racing games, slow the car way down.

    1) Either cut the grass out of the picture and make it an actor or create an invisible actor that goes over the grass. Do the same for the track.

    2) Create one integer game attribute labeled "grass max speed", and another labeled "track max speed".

    3) Set-up a couple rules. When car collides with grass, change car velocity to 200 and constrain attribute Self.Motion.Max_Speed to Game.Grass_Max_Speed.

    4) When car collides with track, change velocity to 250 (so that the speed change seems slightly gradual as you go from track to grass) and constrain Self.Max_Speed to Game.Track_Max_Speed.

    Pretty sure that should work. Good luck ;)
  • ktfrightktfright Member Posts: 964
    OMG... Kamazar is gettin good!!!, it actually works. only problem is that my tracks are curvy, and actors are always squares, so even if invisible, looks weird.
Sign In or Register to comment.