New interpolate custom

Ok, i have interpolate position for move one enemy workign, but how can i do it for interpolate using any x position?

http://i398.photobucket.com/albums/pp67/pacogp/interpolate.png

MAybe something like self.position to self.positionx+100 and later interpolate, but dont work...

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    I guess you could use a timer : set the amount for 1.2 seconds or something like that. This way, it'll interpolate, then after 1.2 seconds, it'll interpolate back.
  • mrpacogpmrpacogp Member Posts: 400
    Hmmmm, i'm out now, but later i Will test it.
    Thank you to much
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2012
    Are you saying that you want the actor to move (via interpolate) a certain distance from any possible x value? So if x=100 it moves from 100 to 220 and back, but if x=200 it moves from 200 to 320 and back? If so, you can do the following -- assuming the actor never moves other than via those two interpolate rules:

    change attribute self.originalX to self.position.X
    when self.position.X=self.originalX
    --> interpolate self.position.X to self.originalX+120
    when self.position.X=self.originalX+120
    --> interpolate self.position.X to self.originalX
  • mrpacogpmrpacogp Member Posts: 400
    edited November 2012
    i want to use it for when you drop enemys on map, move each enemy without need to change they position x
    let me see if work..
    -----
    Works like a charm!
    I dont know why this morning with similar parameters wont work...
    Thank you too much
Sign In or Register to comment.