"Touched" and "mouse was pressed on" are NOT the same

NexusxAlpha

  • Posts: 157
Hello everyone

Today my problem is:

so, I have recently started a new project. The main mechanic is "swapping of image placement"

This is how it goes:

I click on image1
its animation is set to "active"
i then click on image 2
and the images positions are swapped with each others

this works perfectly fine in flash when I use "mouse was pressed on <image>" but now I'm making this game for iOS there seems to be a problem with the mouse was pressed on alternative. Basically when I click on Image1 then Image2 and keep touching the Image2 on the same pixel, it changes the position again and again but it makes the Image1 anim change to "active" and not the one I just clicked on.

I have some attributes that you might be able to understand the concept better with.

Image1 : this is set to the first touched image
Image2 : this is set to the second touched image
Counter : this is used like so:

if counter = 1 and touched <member of group>
image1 = member of group
counter = 2
otherwise if counter = 2 and touched <member of group>
image2 = member of group
end/stop/return whatever

if someone can help me out, it would be much appreciated

thanks

nexus