Haha... I ran into this too and I thought it was funny.
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)
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]
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]
Oh.... (
Having trouble with your game? Sounds like a personal problem.
Tnx grimtooth but i still have the problem ... i created 9 game bolean (like my pieces) called piece1, piece2, ecc... then on my piece i say: when i touch it, piece1 is true else is false, then i say if piece1 is true start drag. But if i release the piece on another piece still stick together how can i do? tnx a lot! .... xcuse me do you know the command to swap depht? tnx friend!
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 ">
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