Double-Click Error. Need Help!

MaestroKaizersMaestroKaizers Member Posts: 6
edited January 2012 in Working with GS (Mac)
Hi, i am making a game where you are supposed to remove different actors.
In order to remove one actor you will first need to click the actor you want to remove, then a "remove" button in the right corner will appear, when you click the remove button, both the remove button and the actor you want to remove will disappear. This is something i have successfully created.
But, i have a problem. I want to make it so, when the actor you want to remove is clicked, the remove button will appear, but when you click the actor once more (when the remove button is in the scene), i want to destroy the remove button, and keep my original actor, and make all attributes go back to it´s original state, to the game is able to reset when i want to.

I have made two attributes.

"Remove Remove" Original state = 0
"Remove Both" Original state = 0

In my Main Actor :

When actor receiver event touch is pressed "Remove Remove" = 0 + "Remove Both" = 0
Spawn the actor at location… And change attribute "Remove Remove" = 1


Rule : When "Remove Remove" =1 + actor receives event touch is pressed
Change attribute "Remove Both" = 2


When "Remove Remove" = 3 + "Remove Both" = 1
Destroy this actor
Change Attribute "Remove Remove" = 0
Change Attribute "Remove Both" = 0


In my "remove button" Actor

Rule: When "Remove Remove" = 2
Destroy Actor
Change attribute "remove remove" = 0
Change Attribute "remove both" = 0


Rule: When "Remove Both" = 3
Destroy this actor
Change attribute "remove remove" = 0
Change Attribute "remove both" = 0



I have tried some debugging…
The debug says that when i press my main character once "Remove Remove" = 1 and "Remove Both" = 2
Thats where i believe the problem is, but how do i fix this.

Please someone out there help! :)

Cheers



Sign In or Register to comment.