GameSalad Constrain Truth or Myth
I am new to Game Salad but I am pass a lot of the basic so i thought. In the last 2 weeks i looked over so many tutorials that in my sleep i was hearing " Hey everybody t shirt booth here". 
Here goes I have 3 columns of 10 boxes stacked one on top of another. All 30 boxes are the same character (green box) that was copy over and over. On the green box i set Accelerate to 500 direction down relative to scene.
i have a white box also with same Accelerate he is at the bottom of the columns going left and right, Set on collide with the green Box after 2 seconds it will destroy the green box then continue to go left and right. Then the next boxes on the column come down so you can destroy the next set.
Problem is on collide he moves the whole columns left and right. Can you in games salad constrain just the X to its current location without it being a specific location....example you cant set Constrain Attribute (Self.Position.X) To (Value goes here) because it will set all 30 blocks to that value. Using that one character (green box) Can it be done or is it a Myth just in my head.
I seen in the forum work around use density but the column still move and yes white box density was set to 0

Here goes I have 3 columns of 10 boxes stacked one on top of another. All 30 boxes are the same character (green box) that was copy over and over. On the green box i set Accelerate to 500 direction down relative to scene.
i have a white box also with same Accelerate he is at the bottom of the columns going left and right, Set on collide with the green Box after 2 seconds it will destroy the green box then continue to go left and right. Then the next boxes on the column come down so you can destroy the next set.
Problem is on collide he moves the whole columns left and right. Can you in games salad constrain just the X to its current location without it being a specific location....example you cant set Constrain Attribute (Self.Position.X) To (Value goes here) because it will set all 30 blocks to that value. Using that one character (green box) Can it be done or is it a Myth just in my head.
I seen in the forum work around use density but the column still move and yes white box density was set to 0
Comments
Now you can constrain self.position.x to self.startX and it'll work for all 30 or so actors individually.
Ace
Otherwise in reply to your question.
You could try adding a self. Attribute for starting x position.
Add a behaviour 'change attribute'.
Change self attribute starting x position to current x position.
Then after that behaviour add a constrain. Constrain self x position to self starting x position.
Sorted.
Sorry it's not more detailed but I'm typing on my phone.
Ace
Ace
2.Click the + under attributes select (real) give it a name like (Start position) you can leave it at 0
3.Add change Attribute to this character (self.start.position) to (self.position.X)
4.Then add a constrain (Self.Position.X) To (self.start position)
Works GREAT!!!
Once again thanks a lot guys.