Ey guys!
I am focusing right now with my objective menu. My idea is to show it hovering during the gameplay hovering in the top right side of the screen showing something like this:
Objective 1
-Subobjective 1
-Subobjective 2
....
Objective 2
....
I tried to modify the default menu, and the hovering part during the gameplay is working, however the results are not satisfying me and I would like to know how to create a whole objective menu. I tried to use as references the menu tutorials and the objective popup example, but I am not being successful.
Thanks in advance
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
There's two parts to this: creating the structure of your objectives / sub-objectives, and displaying it in the menu.
For the first: sub-objectives can be defined by placing them in Categories. See the Manual's "Sub-objectives" chapter for details, as well as this tutorial.
For the second: as the exact way such information gets displays varies from game to game, a custom script is needed to display it. I can assist with this, but I'd need details on how things look on-screen. Is this text clickable (i.e. displayed in Buttons), or could it be one long Text box that just displays the available Objectives for the Player to view?
No problem so far with the objective and sub-objective, the tutorial is very well-explained.
Regards the other topic, which is my main issue, right now the progress I did is not really deep, and if possible I would like to know if there is any tutorial or information about how to reach my goals. I think is not really hard, however, I have barely work with the menus.
My willing is to have a box which will provide the current objectives and sub objectives. I don't want to show more details because there will another section in the pause menu with the whole details, including progress and descriptions.
If you have any tips, examples or tutorials are totally welcome.
Thanks for your response, Chris!
The best resource for this would be the Scripting Guide - specifically the RuntimeObjectives and ObjectiveInstance classes. These provide functions you can make use of to extract the relevant data.
Here's an example script, ObjectivesBox.cs, that displays the objective states in the format above in a UI Text box. At the moment it runs every frame, but once the format is correct we can look into have it update only when objective states are updated: