C
C#15mo ago
Hutsakeee

❔ Setmax coins to complete level C#

Hello 👋 This code i have added into my Playermovement script: Code: if (other.gameObject.tag == "Greenplanet" && ScoreManager.instance.score >= maxCoinsValue) Issue: ScoreManager it tell The name 'ScoreManager' does not exist in the current context. Solution? Players must complete the amount of coins to complete the level. What is the easy way to use after: if (other.gameObject.tag == "Greenplanet" && ??? to set the max coins. Is just only this line that need to be fix. I have ScoreManager etc but not in PlayerMovement script. How to add it? Thanks for your help.
9 Replies
Thinker
Thinker15mo ago
$unity
Hutsakeee
HutsakeeeOP15mo ago
its C# i think and i hope
Thinker
Thinker15mo ago
I mean you're using Unity
Hutsakeee
HutsakeeeOP15mo ago
Yes sir
Thinker
Thinker15mo ago
This question is more suited to the Unity server than this one
Hutsakeee
HutsakeeeOP15mo ago
The game is working but i only need that line of code so i can set max coins when players collect the coins then the level is complete when jumping on the island
Hutsakeee
HutsakeeeOP15mo ago
This is the hole code of that part:
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server