Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Skullar on December 20, 2010, 04:04:00 am

Title: SUBTITLES sexp used for Custom HUD effects.
Post by: Skullar on December 20, 2010, 04:04:00 am
I experimented with the SUBTITLES SEXP to simulate computer displays.

The problem is : When you show something, you do not really know WHEN to stop showing it, so you have to find a walkaround for "display time"
This is quite a tricky thing to implement.

I am using a EVERY TIME condition and need to know the refresh rate of that sexp.
For example : If this trigger is checked 25 times a second, I would use a display time of 1000/25 = 40 milliseconds for simulated HUD stuff shown with SHOW SUBTITLE.

Since I use show SUBTITLE to display a great deal of grafics onscreen, I would like to have the SEXP augmented. Who can I beg for ?
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: karajorma on December 20, 2010, 06:48:41 am
For a start, don't use every time. You really shouldn't be using that SEXP unless you actually need to flush the SEXP tree. Repeating When has the exact same effect and has added bonus of including a set number of times it will be checked.

Secondly, frame times are dependent on number of frames per second. Which is why you shouldn't try to depend on them. The Mission-time and Mission-time-msec SEXPs are what you probably want. Store the current time in a variable and then check if it's above a certain value when it's time to stop counting.
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: Skullar on December 20, 2010, 08:24:53 am
Does FRED support MODULO operation ?
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: General Battuta on December 20, 2010, 08:31:37 am
Can custom HUD gauges display images?
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: Skullar on December 20, 2010, 08:46:51 am
Is the atomic weight of Iridium 192.22 ?
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: sigtau on December 20, 2010, 09:31:08 am
Is everyone here a collective, huge smartass?
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: Hero_Swe on December 20, 2010, 09:33:51 am
yes, to all of the questions.
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: The E on December 20, 2010, 09:39:28 am
I am disappoint.

Yes, you can use HUD gauges to emulate a computer display.
This is, in fact, the best method available.
Yes, HUD gauges can display images. That's what the "Filename" field in the custom gauge definition is for.
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: Skullar on December 20, 2010, 09:42:20 am
Then I will take a look at the custom hud-Gauge thing...

Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: Skullar on December 22, 2010, 12:47:39 pm
havent found custom hud gauges in fred
Title: Re: SUBTITLES sexp used for Custom HUD effects.
Post by: General Battuta on December 22, 2010, 01:06:40 pm
havent found custom hud gauges in fred

You need to set up custom hud gauges in a table. And you'll need to be using a recent 3.6.13 build to access them in FRED.