Jump to content

CnCNet Forums

Search In
  • More options...
Find results that contain...
Find results in...

Mission objective text ingame [solved]


Recommended Posts

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.

Any input would be nice ^^

Edited by yuri624
Solved, solution included.
  • Upvote 1
Link to comment
Share on other sites

While searching for something else (new thread) I randomly stumbled across exactly what I was looking for:

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.

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.

posted image

  • Upvote 1
Link to comment
Share on other sites

  • yuri624 changed the title to Mission objective text ingame [solved]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By yuri624
      So I try to change the template type of a cell ingame. This is on the Desert theme, going from an empty, passable cell to an impassable brush.
        Code:    CellClass * cellptr = &Map[257];
         struct {
            TemplateType TType;      // Template type.
            unsigned char TIcon;      // Template icon number.
         } temp;
         temp.TType = TEMPLATE_BRUSH1;
         temp.TIcon = 0;
         cellptr->TType = temp.TType;
         cellptr->TIcon = temp.TIcon;

      After triggering this code the cell is no longer passable as it should be.
      In the classic graphics the cell gets correctly updated (both the passable status and the GRAPHIC itself), but in the remastered graphics it does NOT (not GRAPHIC update).

      What am I missing here?
    • By yuri624
      I'm trying to render a custom graphic. Let's say I have that pink box. How can I render it on top of the sidebar next to the credits (1), over the build icons (3) and maybe the game view (2).
      All I found was code in power.cpp, radar.cpp and sidebar.cpp that mostly doesn't seem to do anything. I can comment out a lot of it without seeing any change ingame.
      Any idea how to do that?

    • By Soviet Reaper Dragon
      As any of you fellow traditionalists out there remember about the very first Command & Conquer game, The Global Defense Initiative's armies wore Gold and The Brotherhood Of NOD's armies wore Grey.
      The remastered version is almost complete except for this one minor crucial detail. GDI still has the option of choosing Gold as their color, however Grey is missing and traditionalist Brotherhood Of NOD players like me cannot select it, but must settle for second best in choosing Red when playing as NOD.
      Has anyone else told the developers about this and suggested they remedy this acute annoyance by adding in Grey to one of the downloadable updates for C&C Remastered?

    • By Xeroyashar
      how can I do i put zombie mission civilan my map ?

      (Türk var mı varsa yardımcı olabilir mi )
    • By drknox88
      I installed the Origin C&C Generals version of Yuri's Revenge, then I installed Purple Alert. The Purple Alert launcher loads fine, but when I click "Launch Purple Alert" the C&C Generals "Ra2 or YR" launcher pops up. When I click YR it just loads the Vanilla YR. Is there any way to bypass something so that I can play Purple Alert? I played it years ago when I had the non C&C Generals version and it was the best mod ever!
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...