Drag several actors...
curvilinee
Member Posts: 17
Hi, I have a problem with a puzzle game... when the pieces overlap stick together
how can i do? tnx
how can i do? tnx
Comments
Just make a game attribute (Boolean), mine was called "carrying.block?"
Only allow the player to move an actor if "carrying.block?" Is false, set it to true when they pick one up and false when they drop it (for me that just meant when game.touch.count=0)
Good luck!
Grim
Having trouble with your game? Sounds like a personal problem.
I just meant:
When Touch.Count=0
Change Attribute: Self.X to (floor(self.x/[Grid size]))*[Grid size]
Change Attribute: Self.Y to (floor(self.y/[Grid size]))*[Grid size]
Having trouble with your game? Sounds like a personal problem.
My code on actor is this:
on touch
Change attribute: self.physics.drag to 1 else self.physics.drag to 0
on touch
Change attribute: self.physics.drag to 1
Constrain attribute: self.position.x to game.Mouse.position.x
Constrain attribute: self.position.y to game.Mouse.position.y
what can i add to this code? xcuse me i'm newbie ">