Trouble with a certain kind of movement

Hello, I am not sure if this is the right place to ask this question but I am using the windows version so it may be. I have an actor that I want to "glide" across the screen in some sort. I would like it to slowly start moving in a random direction slow down after a few seconds and come to a complete stop, wait maybe 3 - 5 seconds and repeat this. I have tried a few different things using the timer. I set the timer for 5 seconds, use the "move" (direction is random from 0 to 360) and repeat the process every 5 seconds. I realize this is definitely not how it should be. It just starts out with the speed I set (50) waits 5 seconds and just turns going the same speed. I am brand new to GameSalad and would just like a little help on this.

Thank you for taking the time.

-Donald8274

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Use the accelerate behavior. Put it in a for timer. Accelerate creates a velocity and once you cut it off the actor will cruse on it's own. Kind of like pushing a toy car. You'll have to toy with the settings but here is a basic set of commands.


    Timer every 5 seconds. (Put all the code below in this timer)

    Timer for .5 seconds
    Accelerate

    Timer after 2 seconds

    Change attribute. self.motion.linear velocity. X To 0


    Change attribute. self.motion.linear velocity Y To 0
  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2014
    If you use Interpolate with the 'ease' controls (’ease in' and 'ease out') you can have the start and the end movement dampened rather than starting or stopping suddenly.
Sign In or Register to comment.