Forums Gallery Downloads LOGIN |REGISTER

How to display mission objectives using debug text.

Help others by sharing your tutorials here.


 

User avatar
Adimopoulos
Just getting started
Just getting started
 
Posts: 9
Member since: 19.08.2011, 02:08
Location: UK
Likes: 1

How to display mission objectives using debug text.

Postby Adimopoulos » 03.01.2012, 18:23

Hi,
I decided to use the free SDK for my degree project and came across an instant and obvious problem, no HUD system. After a couple weeks being able to avoid this problem the time has come where I needed mission objectives to be displayed in a stand alone game.

I only have Crysis 2 on Xbox and I don't know if there is a better work around if you have the game and the free SDK on PC (if there is please enlighten me), I haven't found anything in the forums so I have decided to post the results of my tinkering.

Please note: I have not been using CryEngine for very long so this might seem basic, this tutorial is mainly aimed at people like me who want to keep development simple and don't have the time or sufficient knowledge to program a UI system.

Onto the tutorial! Well it is more a where to go and what to do, in what order type of deal.

It is assumed you have basic knowledge of the engine, placing objects, flowgraph and what not.
Before anything else set up your mission objectives you can find a helpful guide here;

http://freesdk.crydev.net/display/SDKDOC2/Setting+Up+Mission+Objectives

Once you have done that, set up your game logic if you have not done so already, follow the steps here;

http://freesdk.crydev.net/display/SDKDOC2/Basic+Game+Logic

Ignore the loading a new mission section for now, I am focusing on one mission. Make sure that you have created a flow graph for your spawn point and not just dragged in a spawn point. With a flowgraph enabled every time you hit Ctrl+G in the editor you will spawn at the spawn point, that's an important step.

I followed a tutorial on displaying player health in the CryEngine cookbook, and it occurred to me that it must be possible to display all sorts of other stuff. Like objectives woo!!

Image

Here you can see my flowgraph, I've linked the MissionObjective1 to "Show" a DisplayDebugMessage on the output of the MissionObjectives1 being activated.

DisplayDebugMessage can be found under the HUD in components on the left. I have also added LocalPlayer and linked the entityId to the input of DisplayDebugMessage. This will tell the message where to display.

I have also tweaked a few settings in the debug message, the message is "find a weapon" which can be changed to anything you need. It will also display for 10 seconds, this can be changed in the display time. Position can be changed in posX and posY aswell as font size and colour.

This is super quick and easy, but computationally expensive so I wouldn't write essays. If your looking for something easy that will get the job done so that you may focus on other things like me then this works. It's not perfect and could be improved upon, this is a great community and I know other people might have better ideas so feel free to share.

Image

There it is working, again I hope this helps some people, I'd love to hear thoughts and improvements and even if someone else has done better. p.s the game doesn't look great it all placeholder.
User avatar
Cry-Adam
Crytek Staff Member
Crytek Staff Member
 
Posts: 11296
Images: 182
Member since: 09.01.2008, 01:11
Location: Crytek HQ
Likes: 859

Re: How to display mission objectives using debug text.

Postby Cry-Adam » 04.01.2012, 11:57

Nicely done! This has been a fairly common question, how to display objectives without a UI, so hopefully people will find it useful :)

Image
Image
No dev/modding PM's please, use the forums! :)
Achievement Unlocked: Wear the Winter avatar all year.
User avatar
Adimopoulos
Just getting started
Just getting started
 
Posts: 9
Member since: 19.08.2011, 02:08
Location: UK
Likes: 1

Re: How to display mission objectives using debug text.

Postby Adimopoulos » 04.01.2012, 15:19

Thanks! I really hope this will come in handy, it's helped me overcome some obstacles, I also hope people will take it and add to it until the real HUD appears. :D
luke78
Developer
Developer
 
Posts: 261
Member since: 16.03.2011, 09:58
Location: UK
Likes: 3

Re: How to display mission objectives using debug text.

Postby luke78 » 03.03.2012, 04:33

This is what I come out with a version 3.3.9. Just to display simple text, but can be used to display mission objectives. You could also make it by the press of the button.

display text message.jpg
display text message1.jpg
User avatar
Adimopoulos
Just getting started
Just getting started
 
Posts: 9
Member since: 19.08.2011, 02:08
Location: UK
Likes: 1

Re: How to display mission objectives using debug text.

Postby Adimopoulos » 03.03.2012, 12:34

Awesome! Thanks for sharing, this will help me get started on objectives in the new UI, I'm so excited to finally have scaleform!
luke78
Developer
Developer
 
Posts: 261
Member since: 16.03.2011, 09:58
Location: UK
Likes: 3

Re: How to display mission objectives using debug text.

Postby luke78 » 04.03.2012, 03:06

Here is a link to great tutorial about HUD. I already ask this guy if he could make a tutorial about mission objectives and map. We will see if he will agree to that?

http://www.crydev.net/viewtopic.php?f=291&t=84897&start=15

And I've got a confirmation. He is going to make them. Just be patient and stay tuned.
User avatar
Adimopoulos
Just getting started
Just getting started
 
Posts: 9
Member since: 19.08.2011, 02:08
Location: UK
Likes: 1

Re: How to display mission objectives using debug text.

Postby Adimopoulos » 04.03.2012, 12:47

Awesome, thanks for that ill get started on that today.


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community