Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: HLD_Prophecy on March 11, 2019, 03:19:25 pm

Title: Hiding msg gauges not working like I need it to
Post by: HLD_Prophecy on March 11, 2019, 03:19:25 pm
Hey all!

This being the situation: I need some text to display on screen, accompanied by a voice file .wav. The visible text is in the form of subtitle text. The .wav file will be conveyed by a training msg (which can be associated with a voice file unlike a subtitle text) and that training message is to occur invisibly so as to play the voice file at the same time as the subtitle text appears.

Trouble is that two messages appear on screen at the same time, along with the voice. I can't figure out how to HIDE the training msg, while SHOWing the subtitle text. I tried shutting off HUD gauges right and left and nothing seemed to work.

Pls see the attached screenshots for the events concerned, and an example of what this currently looks like in-mission (blue text is unwanted, white subtitle text needs to stay):

(https://www.dropbox.com/s/40ey7vx98djst07/duplicate%20text%20example%202.PNG?raw=1)

(https://www.dropbox.com/s/3evb41z2lpqcgox/duplicate%20text%20example.PNG?raw=1)
Title: Re: Hiding msg gauges not working like I need it to
Post by: General Battuta on March 11, 2019, 04:21:55 pm
Put $emptyVar as the content of the training message (literally that text). Then create a string var called emptyVar, make the content a single space. Play the training message, don't worry about disabling the hud or anything.
Title: Re: Hiding msg gauges not working like I need it to
Post by: karajorma on March 11, 2019, 06:32:45 pm
Just out of interest, why wouldn't a training message that was just a space work? Why the need for variables?
Title: Re: Hiding msg gauges not working like I need it to
Post by: HLD_Prophecy on March 11, 2019, 07:23:26 pm
OK thanks! but how do I make sure that the .wav file is still linked to the training message?
Title: Re: Hiding msg gauges not working like I need it to
Post by: Mito [PL] on March 12, 2019, 11:02:05 am
Aren't you manually selecting the proper audio file for the message anyway?
Title: Re: Hiding msg gauges not working like I need it to
Post by: HLD_Prophecy on March 12, 2019, 03:16:55 pm
Aren't you manually selecting the proper audio file for the message anyway?

There's a msg in the msg list called "Child" it's defined like any normal pilot-sent message, with the text and voice .wav associated. The training message was set to call up that msg.
Title: Re: Hiding msg gauges not working like I need it to
Post by: General Battuta on March 12, 2019, 05:03:48 pm
Just out of interest, why wouldn't a training message that was just a space work? Why the need for variables?

Last time I tried this it produced a small blue box whereas the var didn't. Pure folk wisdom though, I have no idea if that's still true.

There's a msg in the msg list called "Child" it's defined like any normal pilot-sent message, with the text and voice .wav associated. The training message was set to call up that msg.

But it's not playing? Sure the audio is in the right place?
Title: Re: Hiding msg gauges not working like I need it to
Post by: HLD_Prophecy on March 12, 2019, 05:46:17 pm
No, the audio is playing in the mission as it is. What's confusing me is how do I associate that .wav with the new $emptyVar taining message, as you outlined it above. I haven't tried making it yet because I'm not sure exactly what it should look like and how I can still have the voice .wav if the msg is empty.

Is there any chance you have the time/energy/is it worth your while to cook up a screenshot of an event editor with the plan you're suggesting?  :)  No problem if you don't, but I typically struggle with written directions unless they're exceptionally clear and I have a much calmer time with pictorial directions.  ;)
Title: Re: Hiding msg gauges not working like I need it to
Post by: General Battuta on March 12, 2019, 05:55:03 pm
You select the voice .wav associated with the message manually. It has nothing to do with what's written in the message text.

Right click in FRED. Choose 'add variable'. name it emptyVar. Make sure it's a string variable. The string content should be a single space.

Go to the message in question in the event manager. Edit the message text to read $emptyVar
Title: Re: Hiding msg gauges not working like I need it to
Post by: HLD_Prophecy on March 13, 2019, 09:52:34 am
You select the voice .wav associated with the message manually. It has nothing to do with what's written in the message text.

Right click in FRED. Choose 'add variable'. name it emptyVar. Make sure it's a string variable. The string content should be a single space.

Go to the message in question in the event manager. Edit the message text to read $emptyVar

*snaps fingers*

Gotcha, that's what had me confused.  :) Now what happens when I have a baker's dozen of these training msgs with voice files that need played? Can I do many of these "emptyVar"?
Title: Re: Hiding msg gauges not working like I need it to
Post by: General Battuta on March 13, 2019, 12:01:00 pm
Just make the message text for each message $emptyVar. You only need the one variable.
Title: Re: Hiding msg gauges not working like I need it to
Post by: HLD_Prophecy on March 14, 2019, 08:52:04 pm
Yo, it worked! Thanks Battuta!

...so, post count exceeded your IQ yet?  :D

...thought not.  :lol: