score is not stopping

argisburkeargisburke Member, PRO Posts: 2

hello could you please help me out ,ive created an endless runner game with score that is based on the distance of the score board moving forward,so basically my actor and the score board is moving forward non stop,how to i make it stop the scoring when my actual actor crashes into an obstacle. ?
thanks

Comments

  • GnarlyGnarly canadaMember Posts: 840

    Maybe variable game over Boolean.
    Collide rule with actor change game over to true.

    In moving actor.
    Rule. If game over is true.
    Change attribute self velocity x to 0.

    Hard to say because you didn't say how you score actor is moving.

  • GnarlyGnarly canadaMember Posts: 840

    Are you constraining actor move to score? Or score constrained to time?
    What is triggering increase in score?

    You have rule condition, game over is false

    Increase score.

    Therefore when game over is triggered to true it won't increase.

    Score will only increase when game over is false.

  • dustingriffiedustingriffie Member Posts: 57

    Why not base score on player movements instead and just lock the scoreboard to the HUD?

  • dustingriffiedustingriffie Member Posts: 57

    @gattoman said:
    Are you constraining actor move to score? Or score constrained to time?
    What is triggering increase in score?

    You have rule condition, game over is false

    Increase score.

    Therefore when game over is triggered to true it won't increase.

    Score will only increase when game over is false.

    He is basing his score on how far the scoreboard moves, so instead of having 1 moving object, the scoreboard is moving as well. A timer would be most beneficial I think, if playerDead is false, every 1 second, change attribute score to score+1, or whatever the scale of his scoring is. If playerDead is true, score will not continue.

Sign In or Register to comment.