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