I know, how to get collide working.. I don't want to collide... I need only do that you can put them on selves, put you can drag again only one of these blocks..not both together
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
I see, I misunderstood (again ;-) Presumably you're using something like a boolean attribute called self.DragandDrop? I guess you might be, if it's based on the GS template.
so in one only of the squares, square1 say, put When actor collides/overlaps with square2 Change att. self.DragandDrop to false
This way you'll be able to "freeze" one of the square.
BUT....
Still this problem of when the squares are no longer overlapping, to then change DragAndDrop back to true. The only way I can think is using when x and y coordinates is < and >, avoiding the squares dimensions, then change DragAndDrop back to true.
In my test, I couldn't even get the above to work, but I think it should be able to though. Maybe DragAndDrop needs to be a scene attribute in this instance, and maybe each square needs its own DragAndDrop still, so DandD1, DandD2, etc.
You can experiment with the above, I'm sure; hope I've pointed you in the right direction.
Yes, thanks. That may work but I need to create about 18 "blocks" so it will be hard
EDIT: I trying it now, and it "freeze" block when collide, but if you drag fast you can drag 2 block on themselves and there is same problem... They merge together
Comments
There is a workaround, I'll see if I can find it.
so in one only of the squares, square1 say, put
When actor collides/overlaps with square2
Change att. self.DragandDrop to false
This way you'll be able to "freeze" one of the square.
BUT....
Still this problem of when the squares are no longer overlapping, to then change DragAndDrop back to true. The only way I can think is using when x and y coordinates is < and >, avoiding the squares dimensions, then change DragAndDrop back to true.
In my test, I couldn't even get the above to work, but I think it should be able to though. Maybe DragAndDrop needs to be a scene attribute in this instance, and maybe each square needs its own DragAndDrop still, so DandD1, DandD2, etc.
You can experiment with the above, I'm sure; hope I've pointed you in the right direction.
:-)
EDIT: I trying it now, and it "freeze" block when collide, but if you drag fast you can drag 2 block on themselves and there is same problem... They merge together