Jump to content

CnCNet Forums

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

Mission objective text ingame [solved]


yuri624
 Share

Recommended Posts

I am looking for a way to let text appear during a mission like here (from GDI Mission 9):

unknown.png

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
 Share

  • Similar Content

    • By sgtmyers88
      EDIT: The new mod profile is live!
       
      So long time no chat. lol 😀 Since finally completing the story campaigns for Tiberian Dawn Redux a couple years ago I have been repeatedly approached about carrying the mod over into the RA universe with a spinoff. I haven't decided if it will be a mini-mod type add-on built into TDR (think GDI/Nod vs. Allies/Soviets in skirmish) or a standalone project built off of the renovated C&C Generals SAGE engine TDR is now using. I know a lot of the assets and coding between the original TD and RA games is nearly the same so it would streamline development quite a bit. (looking into the original game files I noticed a lot of the art and audio assets are using the same filenames to confirm this) The biggest hurdles I have will be making a decent naval system, designing, coding, and animating attack dogs and then the Chronosphere stuff. I may also (as I did with TDR) consolidate the unit and structure tech tree and add unit upgrades and special abilities. (e.g. Engineers doubled as Mechanics and APC's doubled as Medics) So who wants Red Alert Redux? And I will say it will not be a 1:1 remake. As I did with TDR I aim to keep as much of the original wacky tech and atmosphere Westwood developed for TD and RA but also have a more realistic spin on it in both appearance and gameplay. I have been considering consulting with the former Cold War Crisis Mod Team and the guys behind Red Alert: A Path Beyond.
       
       
       



    • 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;
         cellptr->Recalc_Attributes();
         Map.Flag_Cell(257);

      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 )
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...