Countdown timer that changes scene problem

B1984B1984 Member, PRO Posts: 91
edited July 2014 in Working with GS (PC)

Fairly simple idea:

Timer counts down from 5. If the player cannot finish the level level before the timer hits 0, the scene changes to the next and 5 points are added to the player's wrong score. So why does it jump from scene 1 to scene 8 and add -40 points?



Comments

  • B1984B1984 Member, PRO Posts: 91

    Also when it jumps to scene 8 the game is frozen.

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2014

    Not too sure what's going on here, can't see the whole of the expression window at the bottom of your images and your question is a little vague . . . did you mean to type ". . . -5 points are added to the player's score . . ." (minus 5 is added to the score) ?

  • B1984B1984 Member, PRO Posts: 91

    I'm tracking right and wrong choices. If the player fails to finish the level, they are are given 5 points to their "wrong" score.

    There's nothing at the bottom of that last image, it should be image #1, the top image is actually image #2 which completes it.

    The expression at the bottom of image #3 says "5-((game.time)-(game.starttime))"

  • B1984B1984 Member, PRO Posts: 91

    More information to report on this strange problem:

    The time will reset if I complete the scene before the timer is out, but if I turn off the "change scene" rule and the timer hits 0, it will not reset on the next scene. Weird!

  • SocksSocks London, UK.Member Posts: 12,822

    @B1984 said:
    I'm tracking right and wrong choices. If the player fails to finish the level, they are are given 5 points to their "wrong" score

    I see ! Thanks for the reply, best of luck with sorting this out . . .

  • B1984B1984 Member, PRO Posts: 91

    Thanks. I don't think anyone will figure this out. This is just another weird bug of GS that turns a simple thing into a butt load of problem solving.

  • 3DMA3DMA Member, PRO Posts: 162

    Without knowing your project and the attributes you´ve set and used, my guess would be that once the timer is cero it sends you to the next scene without reseting the counter... so that next scene is cero as well and it sends you to the next one with -10... and so on till scene 8 with -40.

    Just an idea

  • B1984B1984 Member, PRO Posts: 91

    3DMA, I figured that, but it does reset if it doesn't hit zero when the scene changes and I did add a "if mytime is 0 do change attribute mytime +1", which works until scene 8... then it freezes again.

    Mind you there's 25 scenes to get through =P

  • B1984B1984 Member, PRO Posts: 91

    Well, I moved scene 8 to scene 15 and it works fine now... I know this will end up being a bug that will come back to haunt me but I'm tired of fooling with it for now so... crossed fingers!

Sign In or Register to comment.