Posted: Mon Aug 23, 2021 10:22 pm Post subject:
Mission objective text ingame
I am looking for a way to let text appear during a mission like here (from GDI Mission 9):
I went through the code and couldn't find anything related.
I did find the sound that is played when that message appears. It's "TDR_SFC_BLEEP2.WAV" in the "SFX3D.MEG".
It is found twice in "AUDIO.CPP" but not referenced anywhere to be played.
Joined: 24 May 2004 Location: Flanders (Be) Posts:300000001
Posted: Thu Sep 02, 2021 11:12 am Post subject:
The original game never had this mission hints functionality (at least not on PC), so it probably purely exists on the GlyphX side. So I suggest looking through the xml / csv files to see if you can find those strings. _________________ QUICK_EDIT
The original game never had this mission hints functionality (at least not on PC), so it probably purely exists on the GlyphX side. So I suggest looking through the xml / csv files to see if you can find those strings.
Yea I figured it wasn't in the original PC version as I can't remember those messages from back in the day.
Going through the xml /csv didn't help at all, can't find those strings there.
While searching for something else (new thread) I randomly stumbled across exactly what I was looking for:
Code:
extern void On_Message(const char* message, float timeout_seconds, long long message_id);
First the function needs to be declared in whatever file you are going to use it.
Code:
int text_id = TXT_NONE;
char const * text = "1. Find a way to sabotage GDI's power.\n2. Gain access to the old Soviet helipads.\n3. Overwhelm GDI and re-capture our radar station.";
if (text != NULL) { On_Message(text, 35.0f, text_id); }
Above code will output exactly what's shown in the screenshot.
The border will be green regardless of playing GDI or NOD. Best results are with text_id = TXT_NONE. As seen, \n produces a new line for multi-line messages. This message will stay 35 seconds.
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum