In my Unity Project, I need to be able to code three things: activating an exit after acquiring all the item pick ups, displaying a message telling you to reach the exit, and being able to show a simple ending text screen at the exit location. I have absolutely no idea how to code these things…and I can’t seem to find some examples anywhere.
have you looked into unity’s gui?
If you go there :
You should be able to find what you’re asking for for at least the inventory.
There is an excellent tutorial to start a rpg game.
By the time you understand all the concepts , activating an exit and printing a text on screen will be easy.
To Show text you can use GUIText or GUI.Label.
Good luck in your research!
Well, this is a first person exploration and platforming based game. Which of these Tutorials would point me in the right direction? Also, I already understand how to make a GUI text screen, just not a text pop up.
You don’t know how to code, these tutorials are to explain you how to do inventory, pick up items, display information on screen. You have GUI information, inventory management, etc. It would help you understand and code. Having a first person or third person doesn’t change the way you code.
If you think it won’t help you, you can still look at the Unity documentation for the GUI.
I would just like to know where this information is in the Tutorials.
These tuts didn’t help.
Sorry then. Hope someone else can help you.
Have you tired using Unity’s Scripting documentation? There is such a vast of amount of data in the scripting API that all other tutorials are pretty redundant in my opinion.
This is a fairly simple concept and I shall explain it briefly. You can use the Unity reference to search up the terms that I have used. For the first person controller, you can import the “Character Controller” package from the Assets within unity and drag the first person controller into the scene.
Next you can create a script which contains the OnCollisionEnter() function and you can define what happens when the player touches the ball in this script. You can create a Boolean which states whether all the pickups have been collected and if they are, set it to true and trigger a GUI box which tells the player to reach the exit. As for displaying the message, you need to use Unity’s GUI on which there are hundreds of tutorials on YouTube, so check them out.
For activating the exit, you can use the Boolean which we had created above. You’ll have to create a method which allows the player to use the exit via the Boolean we have created. When the Boolean is true, call the exit activating method and Voila! Dinner is ready.
This is kind of a rough idea of what you can do but if you aren’t able to understand this, I highly suggest you to watch a ton of tutorials and read the documentation until you have become comfortable with unity. Trust me, that’s what I did anyway.
Okay that helps.