Hello
I’ve been working on a game, and in said game, the goal is to collect a certain number of notes before you can progress to the next level.
The only problem here is that I can’t seem to figure out how to get this system to work. This is the code I have attached to an empty gameobject in the scene:
Then, in the PickUpNote script attached to the player, specifically at the part where the note model is destroyed, I’ve added this line:
Collectibles.collected++;
The problems I’m seeing now:
- The errors in the Collectibles script. It doesn’t seem to recognize the variables I just declared in the same script, and not even the ‘if’-statement.
- The GUI box doesn’t seem to show itself.
I feel like I’ve made a very dumb and basic mistake but I can’t seem to find it. Can anyone help me with this?