Constrain attribute question

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'm randomly spawning bricks that fall from the top of the screen. Ideally, I don't want the bricks to move left/right but up/down is okay.

So, am I able to Constrain Attribute: self.position.X to self.position.X? Will that prevent the left and right movements?

Comments

  • StusAppsStusApps Member, PRO Posts: 1,352
    Should be able to set linear motion x to 0 in the brick actor. Should work with a change attribute otherwise a contrain to 0 should work.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes, but you will need to create an attribute in the Actor first.
    And change self.Position.X to that.

    Something like:

    Change Attribute: self.myInitialX To: self.Postion.X

    Constrain Attribute: self.Postion.X To: self.myInitialX
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Stus's option is interesting too, I wouldn't have thought of that!

    Constrain Atribute: self.motion.linear.X To: 0
  • DrGlickertDrGlickert Member Posts: 1,135
    Thanks guys!
Sign In or Register to comment.