- Global Variable on the event sheet
Name: Scoring
Type: Number
Initial Value: 0
- "Player" (Sprite 1) On collision with "Coin" on the event sheet
-"Once we're in the Edit action menu, we would need for it to add points to our global variable. So, set it to Add to, found in 'Global & local variables'
-Set the variable to scoring.
-In the Event Sheet, it should look like this:
"Player" On collision with "Coin": System: Add 1 to Scoring
-Destroy Coin
(This tells the game to Destroy Coin > Update Score > Refresh ScoreText)
SOURCE:
https://www.construct.net/en/tutorials/create-coin-based-points-1221