# GameSalad

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Interpolating Speed

Posts: 52Member
I currently have two actors, one the player and one an enemy. I want the enemy to follow the player, which I have already done. What I can't figure out is how to make the enemy faster every second of the game. I want to interpolate his speed from say 0-1000 over 2-3 minutes. Can I use game.time to put this into effect? Just not sure what to do at the moment.
Any help would be much appreciated.

## Comments

• Auckland, New ZealandPosts: 854Member
Times the tracking method by the self time to make it do that.

If you don't provide more details in a question like this it's a bit tricky to give an exact answer sorry - but be super careful of using game.Time - it does not stop or act like self.Time.

Cheers, [email protected]
• London, UK.Posts: 12,822Member
edited November 2013

I currently have two actors, one the player and one an enemy. I want the enemy to follow the player, which I have already done. What I can't figure out is how to make the enemy faster every second of the game. I want to interpolate his speed from say 0-1000 over 2-3 minutes. Can I use game.time to put this into effect? Just not sure what to do at the moment.
Any help would be much appreciated.

Not quite sure what the issue is ? If you want to interpolate an actor's speed from 1-1000 over 3 minutes do this:

Make a 'real' attribute, let's call it 'ABC'.

Interpolate ABC to 1,000, duration 180 (which is 3 minutes).

Move To player's X and player's Y, speed ABC.
• Posts: 52Member
Sorry, forgot about this post.
@matarua thanks, this is the method I'm using.
@Socks Thanks for the help, but matarua's suggestion is working well
• Auckland, New ZealandPosts: 854Member
Glad you got it working
• London, UK.Posts: 12,822Member

Sorry, forgot about this post.
@matarua thanks, this is the method I'm using.
@Socks Thanks for the help, but matarua's suggestion is working well

>-
Sign In or Register to comment.