Touch rule

Hi all,
I am having a bit of a problem with the touch rule. In my game, when you touch an actor and all of the other rules are right you don't lose any lives. This works fine if I touch and release with my finger on the screen but if I touch and leave my finger on there, when the other rules become untrue you lose a life.
Is there an issue with touch in this way or is there something in my logic not quite right?
Any help would be great as I've been chasing my heels with this for a while now.
Cheers,
LBG
I am having a bit of a problem with the touch rule. In my game, when you touch an actor and all of the other rules are right you don't lose any lives. This works fine if I touch and release with my finger on the screen but if I touch and leave my finger on there, when the other rules become untrue you lose a life.
Is there an issue with touch in this way or is there something in my logic not quite right?
Any help would be great as I've been chasing my heels with this for a while now.
Cheers,
LBG
Comments
When all:
Actor receives event touch is pressed + game.presentType /= (I'll use this for not equal) 1 + game.PresentDropPrompt = true
change attribute:
game.lives to game.lives-1
"presentType" is an integer from 1-6 that is created when the player character overlaps with a marker in the game. "PresentDropPrompt" is an attribute that becomes true when the player character overlaps with these markers. It tells the player to press the corresponding actor. It is these 6 actors that have the above rule, each with a different number in the game.presentType /= section of the rule.
I need the rule to remove a life if the player doesn't press the right actor while the player character is overlapped with the marker.
I hope that makes sense.
Thanks
LBG
perhaps separating your rule conditions
Rule
when touch is pressed
---Rule when game.presentType≠1
----Rule when game.PresentDropPrompt=true
--------change game.lives to game.lives-1
I would use an Index type attribute rather than an integer type for the player character...
(works like a one column array... and IMO computers think of integers as bytes to use operants on)
MH
Cheers
LBG