click once only!

i made a scene where u can click right and wrong Pictures. My problem is how can i make it to only be clicked once? wich atribute is that?

Best Answers

  • gyroscopegyroscope I am here.Posts: 6,598
    edited October 2013 Accepted Answer

    Hi @Lamsong, a boolean attribute. A boolean can be considered as a yes/no switch or toggle... so make a boolean attribute and call it RightPicture for instance.

    So basically when any picture that's clicked and it's wrong, scene.RightPicture doesn't change, but when the correct picture is clicked use a Change Attribute behaviour:

    Change Attribute RightPicture to true

    ---then you can use rules along these lines:

    Rule: When RightPicture is true
    ---do your stuff

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • -Timo--Timo- Posts: 2,313
    Accepted Answer
    this is possible in different ways.
    one way is:
    make a boolean attribute (lets say we call it clicked)
    in the pictures say
    if touch is pressed and game.clicked is false
    do
    change game.clicked to true
    (if this is the right picture do something and if this is the wrong picture do something, this depends on what you want)
  • -Timo--Timo- Posts: 2,313
    Accepted Answer
    you need to add an attribute in the rule. swipe the attribute behavior to the rule. so you have if touch is pressed and attribute (game.clicked) is false :)
    hope you understand this because I am very bad in explaining ;)

Answers

  • LamsongLamsong Member Posts: 6
    hmm sorry if im stupid here :P i made a boolean and i made a "if touch is pressed"inthe Picture but the "game clicked false" i cant find anywhere.. i saw that it was possible to Write the code in manually...can u Write the code for me to copy paste?
    i can change the names myself .this is all i need to complete my little game. im using the win Version by the way
Sign In or Register to comment.