How can I disable an actor from being used again after its been used once?

Nat1127Nat1127 Member Posts: 6
edited November -1 in Working with GS (Mac)
Im making a jeopardy iPhone game for myself so I can study for exams. It is going well except is there any way that I can get something to not get pressed again after I've pressed it? Like say I've pressed x category for 100. I would then answer the question and go back to the screen with the categories and values. So how would I make it so that 100 that i pressed and answered can't be pressed again?

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    make a self attribute called used, then insert a rule in the actor;

    when touch is pressed and self.used = false
    change attribute self.used to true
    change image or dim alpha to show its been used
    Do whatever else you want

    Therefore if its been used and you touch it again, nothing will happen.
  • Nat1127Nat1127 Member Posts: 6
    I did everything word for word and it still doesn't work :{
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Are you resetting the scene, thus causing it all to start again?

    Oh and in the rule, does it say ALL conditions or ANY? Make sure its ALL.
  • Nat1127Nat1127 Member Posts: 6
    I changed it to ALL and it still isn't working :( Sorry for any inconveniences I am causing.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    What are you doing when you say go back a screen? self.attributes will reset.

    So in your 1st rule, it has 2 conditions yeh? 1 saying touch and 1 saying when self.attribute is false and this is set to all conditions to be met?
  • Nat1127Nat1127 Member Posts: 6
    yep. And then under that I put the change attribute. It says: change:attribute self.used to true. I have to type in true and it isn't a click down thing like the rule was. Under that I have a change scene so that when i press the character it takes me to the question
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Here i made a very basic demo for you;

    http://www.megaupload.com/?d=PRFIB87O

    Just unzip and open the project, there is only one actor, if you preview it and click on the actor you will see it change state. Come back to the creator and look inside to see the rules.

    Its only very basic but its the core of what you want, you then need to apply that to however you wish to control it.

    Im off to bed now, hope that helps.

    Cheers
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Nat1127 said:
    yep. And then under that I put the change attribute. It says: change:attribute self.used to true. I have to type in true and it isn't a click down thing like the rule was. Under that I have a change scene so that when i press the character it takes me to the question

    You need to setup the attribute as a boolean. If there is no option for true you enter 1 for true and 0 for false. Check the demo though, its all in there :)
  • Nat1127Nat1127 Member Posts: 6
    Thanks :)
Sign In or Register to comment.