Making A Mulltiple Score App

jfrancisjfrancis Member Posts: 57
I'm trying to make a multiple score app for example, a basketball game where it will count your shots and your points. Any ideas on how i could do this?

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Yes.

    Have two attributes. Call one 'shots' and the other 'points'

    When you make a shot, increase the 'shots' attribute by 1

    If you score points, then increase the 'points' attribute by the desired amount.

    After a game is finished, change the attributes 'points' and 'shots' to 0. This way you won't just keep adding to them when you play again.

    You may also want to save the most shots and most points.

    Do this by using another set of attributes:

    MostShots
    MostPoints

    Have a rule in a controller actor that states:

    If shots is greater or equal to MostShots

    Constrain MostShots to Shots

    If points is greater or equal to MostPoints

    Constrain MostPoints to points

    Then, when the game is over, save 'MostPoints' and 'MostShots' attributes using the save behaviour and a keyword.
    On your title screen, you'll load these attributes in using the Load Behaviour and the same keywords.

    Hope that makes sense/helps,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.