Jump to content

"Silently" Add a New Objective Or Make One Visible

Recommended Posts

I want to have some customized messages appear for certain objectives and was curious if there was a way to prevent the hard coded gui messages for objective complete or new objective from appearing. I was able to suppress the objective complete message by inserting a frame delay between the objective being completed and making it visible, but of course this results in the "new objective" message popping up even if the objective had been visible before.

I didn't see anything, but anyone aware of a method to "silently" make an objective visible so custom gui messages and sound effects could appear?

  • Like 1
Link to comment
Share on other sites

Please visit TDM's IndieDB site and help promote the mod:




(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Can confirm that both completing an objective and making an objective visible are hardcoded to show those messages:

	// Only this objective is complete, not the entire mission
	// Ongoing objectives don't play the sound or mark off in the GUI as complete during mission
	// greebo: Don't play sound or display message for invisible objectives
	if (!obj.m_bOngoing && obj.m_bVisible)
		player->StartSound("snd_objective_complete", SND_CHANNEL_ANY, 0, false, NULL);

		// greebo: Notify the player
		player->SendHUDMessage( "#str_02453" ); // "Objective complete"




void CMissionData::Event_NewObjective()
    gameLocal.Printf("NEW OBJECTIVE\n");

    idPlayer* player = gameLocal.GetLocalPlayer();
    if (player == NULL) return;

    player->StartSound("snd_new_objective", SND_CHANNEL_ANY, 0, false, NULL);

    // greebo: notify the player
    player->SendHUDMessage( "#str_02455" ); // "New Objective"


Maybe string 02453 can be changed temporarily. Otherwise those functions would need to be modified to check some new variable, which is rather late in the 2.10 cycle.

  • Thanks 1
Link to comment
Share on other sites

Something to add to the wishlist for 2.11 perhaps.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call


Link to comment
Share on other sites

  • 3 months later...

Oi. I couldn't find a bugtracker entry for this, so I created one (#5967) and was so free to provide a solution (revision 9925).


I have added a script function on the player that allows to turn the notifications on and off. The function has no return value.

//turn the notification (sound + text) off, using a nonzero value turns them on again

This works for "objective completed", "objective failed" and "new objective". Hope that's what you are looking for.

  • Like 2
  • Thanks 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Anyone have any luck with light.setShader( string ) ? It seems to make whichever light you apply it to full-bright on the initial invoke?
      · 0 replies
    • thebigh

      I'm starting to think we need another mapping contest.
      · 9 replies
    • kano

      Don't you hate it when there's a quality discussion on a forum somewhere online about something, but then two disagreeing users derail and transform it into a back-and-forth poo slinging competition at one another?
      · 9 replies
    • Diego

      Oh look the status updates are back! 
      · 2 replies
    • JackFarmer

      After watching the first three and a half episodes of "The Sandman" last night, I realize once again that overly imaginative narratives are not for me. Also, the main actor looks like he has a toothache.
      Which makes me wonder, is there a Dark Mod mission with a medieval dentist?
      · 4 replies
  • Create New...