Cosine Example

sparkzillasparkzilla Member Posts: 152
edited November -1 in Working with GS (Mac)
Can anyone tell me how to change the cosine demo to make the actor move from right to left? I got it to move from left to right but it doesn't want to go the other way, which is, of course, the way I want it!

http://gamesalad.com/wiki/how_tos:gsc_wave_movement

Comments

  • AsymptoteellAsymptoteell Member Posts: 1,362
    I think you'd do "-cosine".
  • sparkzillasparkzilla Member Posts: 152
    That just changes the wave to be an inverse of the original. I need the actual direction of travel to be from left to right.
  • oberningoberning Member Posts: 105
    So you want it to move from left to right, but you got it to move from left to right... so, what's the problem?
  • sparkzillasparkzilla Member Posts: 152
    Sorry I made a mistake, I need it to move from right to left.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    instead of self.init+ everything, make it self.init.x-everything
  • sparkzillasparkzilla Member Posts: 152
    Yes it works! Thank you!

    Use the second example in the Wiki (left to right) then change:

    Constrain Attribute: self.position.X to self.InitX -( self.Time *50)
Sign In or Register to comment.