A "problem" with creating a Timer..

luisba313luisba313 Member Posts: 10
edited April 2012 in Working with GS (Mac)
Hello

I created a timer, and people have to push on 80 bubblesbefore 60 seconds. If you don't get it, I know how to splash screen saying "Game over", but If you get it, I dont know how to splash something like "you win" when you push the last bubble.

Help, thanks

Answers

  • xforcexforce Member Posts: 187
    have a integer attribute named "bubblecount" and also a boolean attribute named "youwin"

    whenever the actors touches a bubble have this

    rule:

    when actors receives touch is pressed

    change attribute game.bubblecount to game.bubblecount+1


    now somewhere else put this rule

    rule:

    when attribute game.bubblecount = 80

    change attribute game.youwin to true
  • luisba313luisba313 Member Posts: 10
    can you explain a little bit better? Im not english.. thanks
  • xforcexforce Member Posts: 187
    create 2 attributes.

    first attribute name is bubblecount - type is integer

    second attribute name is youwin - type is boolean

    whenever the actors touches a bubble have this



    inside bubble actor have this:


    when actor receives touch is pressed

    change attribute bubblecount to bubblecount+1






    have another actor with this rule inside



    when attribute bubblecount = 80

    change attribute youwin to true
  • luisba313luisba313 Member Posts: 10
    I did all you said, but i don't get it..
  • xforcexforce Member Posts: 187
    that should work if you do it right. the only thing that might probably cause it to not work is you have more than 80 bubbles and you click so fast that the bubblecount goes past 80. if that is the case then this rule


    when attribute bubblecount = 80

    change attribute youwin to true



    needs to be this


    when attribute bubblecount ≥ 80

    change attribute youwin to true
  • luisba313luisba313 Member Posts: 10
    I think it is not the problem, because I tested with 5 bubbles. and I put the integer attribute to 5. so..?
Sign In or Register to comment.