Make a Var called coinamount10(you'll have to make multiple vars for each amount)
Then on a coin actor (they all can't be clones so you'll have to make several different actors for the different coin amounts only one actor per coin amount)Player collision with a coin actor, (you'll have to do repete these steps for each coin actor)
- Code: Select all
coinamount10 = coinamount10 + 10;
Keep on doing the different amounts until finished.
Then add a textNumber to count the coins with (Go to text in the actor control panel of your goldcount and type a random amount of zeros or just one)and on the draw actor event script editor,
- Code: Select all
textNumber = coinamount10 + coinamount20 //or whatever the rest of your amounts are\\//(NOTE: It's easier to do this in one script instead of several scripts)\\
Hope this helps!