How to use Interpolate to move actors?

11clock11clock Member Posts: 450
edited November -1 in Working with GS (Mac)
Now I know that Move and Move To are not reliable fore moving objects and that I should use Interpolate. I'm not sure how to use Interpolate to move my actors, though. I know it's something about X and Y, but I don't know what to do.

I want my enemy to move to the left for 0.5 seconds at a speed of 100, then move up or down at a speed of 150 for another 0.5 seconds, then I want it to move to the left again at a speed of 200 until it reaches the other side of the screen.

Comments

  • NachozNachoz Member Posts: 52
    Its pretty simple once you do it a few times although gaining speed each time is another issue, For the basic interpolate you just make 2 interpolate behaviours one would be self.position x to whatever number the x position your moving to is on the screen and rinse and repeat for the Y position.

    (easy way of finding your positions x and y is take the actor your moving and put it at the positions where he would change directions, then click on the actor and mark down the x and y for each spot)

    hope this helps a little
  • MotherHooseMotherHoose Member Posts: 2,456
    you can also manipulate your Actor with your parameters/motions using Linear Velocity...and no acceleration...

    Timers to change self.Motion.Linear Velocity.X or Y...

    ===
    so many ways to skin our cat...

    MH
  • NachozNachoz Member Posts: 52
    if you do use interpolate you can set the time you want it to last a little shorter each movment to get the speeding up effect
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I do it this was too... On a character that the user controls, I use linear velocity. Other non playable characters and things like zooming and other attribute changing, I'll use interpolate.
    MotherHoose said:
    you can also manipulate your Actor with your parameters/motions using Linear Velocity...and no acceleration...

    Timers to change self.Motion.Linear Velocity.X or Y...

    ===
    so many ways to skin our cat...

    MH

  • 11clock11clock Member Posts: 450
    The problem is that the enemy spawns at a random y position. How do I use interpolate for that?
Sign In or Register to comment.