GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

High score bug when spawning

smc1979smc1979 Posts: 48Member
edited November -1 in Tech Support
I have looked over everything and I cant seem to see what the problem is.
On each level I have the high score for that level and the current score.
As the actor hits things the score adds up and once it passes the high score you will see the high score rise with it. This works fine for each actor that spawns.

But the bug is when the ball hits a object I have it make a 2nd ball so 2 of them are on screen.
As they go the score continues to rise but the high score stops dead in its tracks. And will not rise again. This only happens when spawning the 2nd ball. Otherwise it works just fine. Jus for a note I have the spawner destroy itself, so the user only gets the extra ball once.

Let me post the rules to see if I have missed something or if it is a bug.

Here is the rule for the score text
http://www.pcwintech.com/files/score_rules.jpg

And here is the rules for the spawn
http://www.pcwintech.com/files/spawn_rules.jpg

Again every thing works fine but the high score stops growing.

Also another side bug, in the score rules I had to have it game.score > level_1_highscore
if I tried to use the greater than or equal to it refused to work as well.

Any thoughts?

Comments

  • smc1979smc1979 Posts: 48Member
    Also after more testing.

    If the spawner is hit before the score reaches the same as the high score it all works right.
    But if the spawner is hit after the score has reached the high score it stops.

    very odd indeed.
  • smc1979smc1979 Posts: 48Member
    That is what is odd though. It works fine as is. as long as the score isnt higher than the high score.

    If the spawner is hit before the score reaches the high score it keeps on going just fine. No problems.

    But if the score has reached the high score and the spawner is hit the high score stops climbing.

    That and the other bug of equal to or greater than not working as well.
  • smc1979smc1979 Posts: 48Member
    OK digging into it more today I have found the problem is not with the spawner.

    I changed it to where more than one ball can be on the screen at once, any time more than 1 ball is on the screen and the score is as high as the high score the high score stops climbing.

    But again if the high score is larger than the score it works fine.
    Also made another integer variable to keep track of the balls on the screen. Any of the greater than or equal to rules refuse to work. This seems to be a bug with the way GS is dealing with the numbers. Can any one else confirm they have this problem?
  • smc1979smc1979 Posts: 48Member
    OK I can confirm to 2 bugs are actually one.

    I noticed that when did a rule where a integer attribute is great than to a number. It is the signs that are failing. I cant get the greater than or equal to to work at all and a greater than is used in the rule to raise the high score. It simply stops working.

    Anyways I can report this finding to the GS team?
  • smc1979smc1979 Posts: 48Member
    The more I dig into this the more I find the problem is different.

    To test I added a display text when the score is higher than the high score. And it works. Its the save attribute that has stopped working. It isnt updating the high score. Could it be, the way I have it that I have the save attribute being called to many times to fast?

    It is saving every time the score grows, which with multiple balls is growing very fast.

    I guess my next test will be to throw the save attribute into a time instead of updating so much and see how that goes.
  • smc1979smc1979 Posts: 48Member
    That was it! the save attribute was being called to fast and to many times. By putting into a timer instead its working perfect now.

    Guess this is a good rule to remember, to save attributes to often or the saving them will stop.
This discussion has been closed.