Help with changing scene once reaching a score

Hello

Please could someone tell me how I can change a scene once a player reaches a certain score? I've already got the attribute to keep score and display it, but not sure how to actually change the scene once players reach a score of 3000.

Any help gratefully received! :)

Best Answer

  • bob loblawbob loblaw Posts: 793
    Accepted Answer

    so within the 'rule' behaviour, under the bit that says 'when all conditions are valid', the first option is a drop down box where you can pick from:

    • actor receives event
    • attribute
    • numeric expression
    • text expression

    pick 'attribute' from that drop down. in the next box, select your score attribute, which I am guessing you have created as a game attribute, by clicking game, and scrolling through the attributes in the second column. in the next box, select the 'greater than or equals' symbol. in the last box, type the score you want to trigger the scene change.

    then in the section below that, drag the change scene behaviour, and select the scene (or scene index) you want to go to.

    hope that helps.

Answers

  • bob loblawbob loblaw Member, PRO Posts: 793

    create a rule that says when score is greater than or equal to 3000, change scene

    i like to have a scene controller actor to put rules and variables that are set at the start of a scene, or used to change scenes, into. you’d also put that actor on the lowest layer of your scene.

  • ShakyRobustCrowShakyRobustCrow Member, PRO Posts: 3
    This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.

    Thank you so much for replying!

    Sorry I am pretty new to this so I don't understand the rule bit very well. I can create a rule, but which behaviour do I use to specify what the score should be to change the scene?

  • bob loblawbob loblaw Member, PRO Posts: 793
    This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.
    Adobe Portable Document Format (PDF)
    scoreLevelChangeDemo.zip
    47.87 KB

    here's a quick demo with a few notes in it. click on the score actor to add a random value to the score. within the sceneController actor on each level, there's logic to reset the score when the scene starts, and to change the scene when the score hits 3000+.

    have a play around with it and you should get an idea about how it works.

  • ShakyRobustCrowShakyRobustCrow Member, PRO Posts: 3
    This is an embed external element. It can be deleted using the delete key or the backspace key. To view the full element, press the preview button below.

    Thank you so much for this, it worked! You are a star! :)

  • bob loblawbob loblaw Member, PRO Posts: 793

    welcome

Sign In or Register to comment.