coin tally

Hi all.
This is my post here, apologies if this has been answered (which i suspect it has) but i cant find the answer anywhere on here or on the internet but i would like a add a score count for the amount of coins collected and the player will loose these coins if they hit a specific object and the count restarts (sonic the hedge hog style). Thanks in advanced.

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited March 2015

    Create an Integer Game Attribute named Coins, starting at 0.

    In the player actor add a Rule that says:

    When Player collides with the coin
    Change Attribute Coins to Coins +1
    

    The coin count will increase by 1 each time a coin is picked up, you can then re-set it to 0 whenever you want by using a Change Attribute Behavior again like:

    Change Attribute Coins to 0

Sign In or Register to comment.