Need Help : how to make floating platform move
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!
Not sure why this seems so hard.
Any help on this would be super!
Thanks!
Best Answer
-
MotherHoose Posts: 2,456
@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: 1MH