Unlock Character Pop up Confirmation Issue. It Unlocks Other Characters When Confirming Purchase.

Hello GS Community,
I am going to try and explain this the best I can. Basically what I have is a character select section. Some of the characters are unlocked while others you have to purchase with in game currency. When selecting a character to unlock/purchase I have a confirmation window that pops up asking if you are sure you want to purchase/unlock that character. Now that you have an understanding of what I have going on, here's more into it and the issue at hand.

  I have 3 characters, Character 1, Character 2, & Character 3. Characters 2 and 3 are locked. I also have a couple game attributes which are, "Character Selected", "Character 1 Purchased",  "Character 2 Purchased", "Character 3 Purchased" "Unlock A Character". 

In character 1, it says;
When touch is pressed
Change game.character selected to 1

When Touch is Pressed
When game.Character 1 Purchased is false
& When game.Character Selected = 1
Change game.Unlock A Character to true

In character 2, it says;
When touch is pressed
Change game.character selected to 2

When Touch is Pressed
When game.Character 2 Purchased is false
& When game.Character Selected = 2
Change game.Unlock A Character to true

In character 3, it says;
When touch is pressed
Change game.character selected to 3

When Touch is Pressed
When game.Character 3 Purchased is false
& When game.Character Selected = 3
Change game.Unlock A Character to true

In the Confirmation pop up window, the rules are;
Change Attribute self.StartY to self.Position.Y

When game.Unlock A Character is true
Interpolate to where I tell it to.

When game.Unlock A Character is false
Interpolate to self.StartY.

When Touch is Pressed
-When game.Character selected = 1
--Change game.Character 1 Purchased to true
--Change game.Unlock a Character to false

-When game.Character selected = 2
--Change game.Character 2 Purchased to true
--Change game.Unlock a Character to false

-When game.Character selected = 3
--Change game.Character 3 Purchased to true
--Change game.Unlock a Character to false

Hopefully so far it makes sense what is going on. Now for where the issue is. Say I want to unlock/purchase character 2. In this case I press Character 2 and since it is currently locked, the confirmation window pops up. The confirmation box shoots up from the bottom to the center of the screen covering the 3 character images. Now if I press the confirmation box to confirm the purchase/unlock but my touched the box right above character 3, It will Unlock/purchase both characters 2 and 3.

I need it so when I press the box or an added button to confirm or deny the purchase/unlock it won't register to select any other characters.

Hopefully that makes sense with the issue I am having. Thank you in advance!

Comments

Sign In or Register to comment.