Touch release when button is not active

UltimateCreativesUltimateCreatives Member Posts: 27
edited May 2012 in Working with GS (Mac)
Hi there.

I have got huge problem with one thing. Let me explain it step by step.

I have few buttons. They are all the same on every scene. Every button links to different scene. Each button has two images. When touch is pressed image is different than it;s released. When we release one ot the buttons we are redirected to chosen scene but for first 5 seconds all of the buttons are (should be) inactive. It means that during that 5 seconds image is not changing when we press the button and even button has color aplha set to 0.5 during that period. After 5 seconds all buttons has alpha 1 and when we press theme images are changing. I did it with thanks to New Attribute called active. At the begining of the scene "Active" is 0 and after 5 seconds we constrain attribute Active to 5.

What is the problem? PRoblem is that if we press any of the buttons during first 5 seconds nothing happends but after that 5 seconds we move to th scene which is connected to button which we pressed and released, because rule says that when touch is released and "active" = 1 : change scene. So even when we touched button and released it, after 5 seconds attribute "active" changed to 1 and system remember that few seconds ago we released the button so it changes scene :/

I want to make it in that way:

Only when both situation: press and release is happening during "Active" = 1 than change scene.

I hope i have managed to explain it clearly. Please anyone help me.

Kind regards

Answers

  • xforcexforce Member Posts: 187
    instead of release try "when touch is inside"
  • UltimateCreativesUltimateCreatives Member Posts: 27
    This would work similar to "when touch is pressed" and everything would be ok but ... remember that we have to different images for the button. Different is when touch is pressed and different when it's not pressed (pressed version has additional border and it has to be like that). In that situation: "when touch is pressed" or "when touch is inside" we don't have a chance to see second version of image for pressed button.
  • UltimateCreativesUltimateCreatives Member Posts: 27
    I think I found a solution. I had to ad two new game attributes and few rules but it seems to work. Anyway thanks for trying to help me.
Sign In or Register to comment.