Score Keeping Problem

NicholasSeahNicholasSeah Member Posts: 68
edited November -1 in Working with GS (Mac)
(Please Help! I am going to launch my game soon)

Hi all, I just created this cannon-shooting game. To win the game you need to shoot the ball to the goal. Therefore I have included a score keeper to keep track on how many balls the cannon had shot and I limit the cannon balls to 50 only. The problem is, if I clicked on a pause button or reset button or any other buttons, it will add in 1 more cannon ball to the score keeper. This is not correct, because I did not shoot the cannon ball.

Please help me, and how can I solve this problem.

Comments

  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Hello mate. It sounds like your scoring rule is not setup correctly.

    What are the rules that define the score and save score?

    ----------
    image
    "Honey Tribe is not only a remarkably endearing little game, but it's also incredibly addictive." Pocket Gamer
    "...a touch above the rest in the endless running genre" 148apps.com
    Say hi on Twitter
    Like us on Facebook
    www.HoneyTribeStudios.com
  • NicholasSeahNicholasSeah Member Posts: 68
    Hi, I added an integer attribute which I call it 'IceScore'. Then in both of the cannon ball, I added a Change Attribute Behavior and inserted (game.IceScore) To (game.IceScore+1). After that, I created a new actor which I call it 'Display Score', I put in the Display Text Behavior and used the expression editor to type in (game.score)

    (- I have two cannon balls actually)
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Ok, it'll be easier for me to understand if you write the rules as they appear in GS or post a screenshot of the rules.

    e.g

    When self.color.alpha = 0
    change attributeWin to true

    Also what are the touch rules for your pause and reset buttons?
  • NicholasSeahNicholasSeah Member Posts: 68
    Pause Button: Rule>Touch is pressed>Pause Game

    Reset Button: Rule> Touch is pressed> Reset Scene

    Sorry I am just a newbie I don't know how to write it in that way
  • HoneyTribeStudiosHoneyTribeStudios Member Posts: 1,792
    Knightzxz said:
    Pause Button: Rule>Touch is pressed>Pause Game

    Reset Button: Rule> Touch is pressed> Reset Scene

    Sorry I am just a newbie I don't know how to write it in that way

    I was just asking that you write out the rule as it appears on your screen in the creator, it's nothing 'technical' :)

    You must have told your cannon ball actor when to add +1 to the score.

    So it will be:

    When................. =................
    Change game.IceScore to game.IceScore+1

    What are the missing dots?
  • NicholasSeahNicholasSeah Member Posts: 68
    I only added an change attribute behavior to both of the balls and put in (game.Score) To (game.Score+1), so what do I do now? :(
  • akstudiodevelopmentakstudiodevelopment Member Posts: 93
    When you press the pause button, does the cannon fire??

    Perhaps adding the condition - When touch is Pressed & When touch is Inside.
    This means that any touches outside of that actor will not effect the rules within that actor.
    Hope this helps?? Though I am confused about the two balls?? Are there two cannons?

    K
  • NicholasSeahNicholasSeah Member Posts: 68
    No but it also adds a point to the score. There is only one cannon, there are two balls because i also included a multi-ball selection button, so if I press on the button the ball would change into a different ball :D
Sign In or Register to comment.