C
C#9mo 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
Thinker9mo ago
$unity
Hutsakeee
Hutsakeee9mo ago
its C# i think and i hope
Thinker
Thinker9mo ago
I mean you're using Unity
Hutsakeee
Hutsakeee9mo ago
Yes sir
Thinker
Thinker9mo ago
This question is more suited to the Unity server than this one
Hutsakeee
Hutsakeee9mo 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
Hutsakeee9mo ago
This is the hole code of that part:
Accord
Accord9mo 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.