Need Help : how to make floating platform move

GAMEINTERNGAMEINTERN PRO Posts: 56
edited May 2012 in Working with GS (Mac)
Having a hard time making a actor move left and right on the screen.
Not sure why this seems so hard.

Any help on this would be super!

Thanks!

Best Answer

  • MotherHooseMotherHoose Posts: 2,456
    edited May 2012 Accepted Answer
    @CGOStudios

    on movingPlatform actor prototype:
    add an attribute: origX … index type

    add behaviors:
    changeAttribute: self.origX to self.Position.X
    Interpolate: self.Position.X To: self.origX + self.Size.Width/2
    --Duration: 0.5

    Rule: when
    Attribute: self.Position.X ≥ self.origX + self.Size.Width/2
    -Interpolate: self.Position.X To: self.origX - self.Size.Width/2
    --Duration: 1
    Otherwise:
    Rule: when
    Attribute: self.Position.X ≤ self.origX - self.Size.Width/2
    -Interpolate: self.Position.X To: self.origX + self.Size.Width/2
    --Duration: 1

    image MH
Sign In or Register to comment.