Yes, there's a specific constrain behavior. I suggest starting out looking at the cookbook, watching some video tutorials and searching the forums. you'll easily find answers to things like this. :-)
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Thanks Gyroscope, but I tried that and it doesn't follow the controller. I must be doing something wrong. Here is what I'm doing: paddle1=actor to be constrained controller1=actor to be constrained to on the paddle1 I added Constrain Attribute and in the behavior I set the expression to self.position.x to controller1.position.x
also the controller1 didn't show up in the paddle1 expression editor so I typed it in manually, does it need to be added to some sort of global area?
Thank you Slickzero. The videos cleared it up for me. I remember watching these in october before I started with Construct2. It's been awhile. I was missing the add attribute step.
Comments
One of the behaviours in GSC is the contain behaviour, that'll do what you want.
Edit: typing same time as @HappyKat78
----------------------------------------------------------------------------
iPad app: End of the Earth –•– http://davidgriffinapps.co.uk/
----------------------------------------------------------------------------
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
paddle1=actor to be constrained
controller1=actor to be constrained to
on the paddle1 I added Constrain Attribute and in the behavior I set the expression to self.position.x to controller1.position.x
also the controller1 didn't show up in the paddle1 expression editor so I typed it in manually, does it need to be added to some sort of global area?