Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Mpez on February 15, 2011, 02:49:08 pm

Title: Briefing icons in missions
Post by: Mpez on February 15, 2011, 02:49:08 pm
I have an idea to simulate this http://i.ytimg.com/vi/-qRJDv5UcRc/hqdefault.jpg , http://lparchive.org/Freespace-2/Update%2033/img-1.png (the "command battle view") in game. I've got a problem though. Is there a way to use flat images (icons) in 3d space? I mean, to add icons into the game which would behave like those seen in the briefing (so, basically - how to implement sprites into FS?). I thought of simulating this using show-subtitle-image, but camera movements and zoom would be hard to do that way.
Title: Re: Briefing icons in missions
Post by: FreeSpaceFreak on February 15, 2011, 04:56:18 pm
You could use glowpoints for that.

Make an invisible ship (take a preferably low-poly, like the SJD Sathanas) ship, change all textures to "invisible" in PCS2. Add one large glowpoint named whatever-your-sprite-is. Table this model into FS for use. Repeat for every sprite you want to get into FS this way.
Title: Re: Briefing icons in missions
Post by: Mpez on March 02, 2011, 07:11:51 am
Well, it works (kinda). I've done as you suggested (btw. kudos for Hades for helping me achieve that). It's working but...

http://img201.imageshack.us/img201/1512/fredp.jpg

I assume all glowpoint textures are somehow made round. The erinyes icon I made had proper proportions but after becoming a glowpoint it changed shape to what is shown in the link.
Title: Re: Briefing icons in missions
Post by: FreeSpaceFreak on March 02, 2011, 12:53:29 pm
Hmm, try making the icon square, I suspect that will help.
Title: Re: Briefing icons in missions
Post by: Mpez on March 04, 2011, 09:02:40 am
Yeah, it helped. Thank you! :)

I've got one more problem. I made a quick "command style" interface and used it using the show-subtitle-image sexp:

$Formula: ( when
   ( has-time-elapsed 15 )
   ( show-subtitle-image
      "2_Campaign4"
      0
      0
      ( true )
      ( true )
      100
      100
      9999
   )
)

The interface image is basically a graphic frame. The problem is I can't make the center transparent. I tried using the blue and green colours that are used in the original vps but the engine doesn't make them transparent.
Title: Re: Briefing icons in missions
Post by: FreeSpaceFreak on March 05, 2011, 05:11:31 am
The blue and green colours will only become transparent in specific circumstances, and this way is mostly deprecated.
Just make your screen a PNG with transparency, that should do the trick.
Title: Re: Briefing icons in missions
Post by: Mpez on March 05, 2011, 08:05:34 am
It's working, thanks for the help :)

[attachment deleted by ninja]
Title: Re: Briefing icons in missions
Post by: Mpez on March 05, 2011, 12:07:30 pm
Ok, (probably) my last issue for now: does show-subtitle-image work with .anis? Is there a way of displaying animated images in the game (apart from fiddling with the hud)? I just want to make the CB_default.ani (default briefing ani) appear at the beginning of the mission.
Title: Re: Briefing icons in missions
Post by: General Battuta on March 05, 2011, 01:00:27 pm
Swifty's HUD code should allow that but it can't be done yet, to my knowledge.
Title: Re: Briefing icons in missions
Post by: Mpez on March 05, 2011, 02:10:27 pm
I'll try the hard way then. I assume setting up 104 events for 104 frames of a shorter version of the ani won't be that painful. By the way, what is the maximum number of sexp events? ;)
Title: Re: Briefing icons in missions
Post by: General Battuta on March 05, 2011, 02:12:54 pm
You should probably just use one event with 104 arguments, each argument a frame filename, invalidating one argument every frame. :|
Title: Re: Briefing icons in missions
Post by: Mpez on March 05, 2011, 02:33:13 pm
Something like this (0001, 0002 being the first 2 frames): ?

$Formula: ( when-argument
   ( any-of "1" )
   ( true )
   ( show-subtitle-image
      "0001"
      0
      0
      ( true )
      ( true )
      0
      0
      66
   )
   ( invalidate-argument "1" )
   ( when-argument
      ( any-of "2" )
      ( true )
      ( show-subtitle-image
         "0002"
         0
         0
         ( true )
         ( true )
         0
         0
         66
      )
      ( invalidate-argument "2" )
   )
etc.
)

I'll try it tomorrow, thanks for your help.

EDIT: Ok, I tried it and it doesn't work. Apparently I don't know how to use arguments in this situation. If someone could provide a formula for the first frames I would be very grateful.
Title: Re: Briefing icons in missions
Post by: Lucika on March 05, 2011, 03:00:44 pm
It's working, thanks for the help :)

Now team up with Ransom and create Windmills: The Interactive Movie.