How to touch only one actor at the same time
keekee312
Member Posts: 91
Hi, I have an issue with the touch.
I have many actors moving everywhere in the stage and I want to click them only one by one but when I touch one, it also selects those which are stuck to it, Is there a way to select only the first one I clicked ?
Thank you
I have many actors moving everywhere in the stage and I want to click them only one by one but when I touch one, it also selects those which are stuck to it, Is there a way to select only the first one I clicked ?
Thank you
Comments
Daren.
Then if touch inside -> change pickIndex to # for that actor-> then if pickIndex is that # -> all the action...end with If touch released -> Timer After 0.001 sec -> change pickIndex to 0.
of course you got to make a Note to list the # for each actor.
I did this with instances of Actor, as well as several independent actors.
MH
Thank you
and set that before you set index to 0?
MH
But if self.pickIndex = # when it's touched so every actor touched at the same time would be selected at the same time. Something might miss me
http://gamesalad.com/game/play/81660
If I understood you correctly.
and then because an other rule says "when whichID = ID => do what you have to do"
So only one actor can be selected at the same time. I'll test that and will tell you, Thank you very much !!
I manually put an ID for each instance actor and then I set the rules like this :
When touched is inside => change WhichID to self.ID
(new rule in the same rule) when self.id = whichID => do what you have to do (become grey meaning that it's selected etc)
but I still can select 2 actors at the same time...