Stuck forever, How to stop the score from adding +1 when i play the scene again

BubbleBubble Member, PRO Posts: 4
Hi,
Im stuck for 3 days now on that:

When i play lvl 1,2,3,4 ect… and if my time is:

7.5 or less it add +1
9.5 or less it add +1
20 or less it add +1

so if u get less than 7.5 sec u get score = 3

problem is when i play the lvl again it add the score again and it jumps to score = 9, i tried many ways but nothing works.

i tried to give each scene a number like attribute: no more score = 0

attribute: time<7.5
attribute: no more score = 0


attribute: score (to) score+1
attribute: no more score (to) 1

but still it bona add +1 if i played it again.

MEDIC!!!!!

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2013

    Hi @Bubble

    Try the following or similar, see if this does it for you. Make a new integer called Mainscore (game attribute)

    Rule: When scene.MyTime < 7.6
    Change Attribute Score to Score+3

    Rule: When scene.MyTime >7.5 and < 9.6
    Change Attribute Score to Score+2

    Rule: When scene.MyTime >9.5 and < 20.1
    Change Attribute Score to Score+1

    Change Attribute Mainscore to Mainscore +Score
    Change Attribute Score to 0

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

  • colandercolander Member Posts: 1,610
    It is a little hard to find the logic error without seeing you rules. Try posting screenshots of your rules or better still an example project so someone can find the problem. I think this will be the quickest way to get the solution.
  • BubbleBubble Member, PRO Posts: 4
    thnx for answering guys,

    i think i didn't cleared out what is the problem exactly.
    i want to stop the score system for the lvl i just finished, so if i played it again, it will not add anything to the score.


  • mounted88mounted88 Member Posts: 1,113
    On your each level select button

    When touch is pressed
    Change attribute game.level1score to 0

    This will reset each level score when the user presses the level select button to reply a level, also good for a replay button
  • BubbleBubble Member, PRO Posts: 4
    thnx again guys,

    i found a way to do it, but it is a very long long way to do it.
    create an attribute for each timer and change it if u hit the time then save the attribute.
    so if i have 50 lvl's, i need to do 3x50 attribute and save them :(

    closed thnx
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2013

    You seem resigned to your long-winded solution (even when several of us have hinted
    at a far simpler solution) without wanting any more suggestions to help you…

    (I understand better your problem now you've added more info: by the sound of it, a boolean for each of your levels could be used to allow a score, or stop a score being added if the level has already played...already a third of the amount of work compared with your own suggestion… alternatively, and probably the better solution, use a table with an integer column for zeros and ones, etc., no point describing further for you but hopefully you know what to do with the info in the table.

    Anyhow, I'll close this thread as you want.

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

This discussion has been closed.