How to drag the actorsand how to change actor when touch another actor
mohand7
Member Posts: 3
hi guys
I want to ask you 2 questions:
the first one: Is how to make the actor move when I clicked on it and move the mouse at the same time ?
the second question:
I have 3 actors (actor 1 , actor 2 , actor 3)
and i want to ask that if actor 1 touch actor 2 make them disappear and show actor 3 Instead of them So how to do it? please help me
Best Answer
-
bjandthekatz Orlando, FlPosts: 1,375
Im not at my computer, but these should work.
1. When touch is inside constrain attribute self.position.x to devices.mouse.position.x and self.position.y to devices.mouse.position.y
2. In actor 1, if overlaps or collides with actor 2, destroy. Spawn actor 3.Need Help? Email Me | Templates | Full Game Source Code
Answers
Thank you that's help me a lot
but how to change actor 1 to actor 3 when touch actor 2 but after I release the mouse button (that mean when I don't move it)