OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: desper8 on 15 Jan 2004, 05:32:32

Title: insert JPGs
Post by: desper8 on 15 Jan 2004, 05:32:32
i wanna put a JPG into breifing screen
and i need an ingame splash screen at the start!

any one got  a template for the two?

thanx in advance
Title: Re:insert JPGs
Post by: Terox on 15 Jan 2004, 15:38:02
To add a .jpg into the briefing, use something like the following line

<br><p align="center"><img src="picture.jpg" width="64" height="64"></p>

the actual jpg is stored in the mission folder

Dont bother using too high a resolution, this only adds to filesize, and once you get to a certain resolution, it doesnt appear any better. I forgot what the max resolution i used was


For size you can use a combination of the following width, height sizes

16 32,64,128, 256, 512


I find 256 X or greater is a bit too big for the page though



as far as adding it to the cutscene is concerned

here is an example of the Description.ext entry
Code: [Select]
class RscTitles
{
   titles[]={starttext1};
   
   class starttext1
   {
     Ã‚ Â Â idd=-1;
     Ã‚ Â Â movingEnable=0;
     Ã‚ Â Â duration=6;  
     Ã‚ Â Â fadein=2;  
      fadeout=2;
     Ã‚ Â Â name="starttext1";
     Ã‚ Â Â controls[]={"Screen","Titel1",};
     Ã‚ Â Â 
     Ã‚ Â Â class Screen : RscStdText
     Ã‚ Â Â {
     Ã‚ Â Â   Ã‚ Â Â style=48;
     Ã‚ Â Â   Ã‚ Â Â text="MYPICTURE.JPG";
     Ã‚ Â Â   Ã‚ Â Â x=0.2;
     Ã‚ Â Â   Ã‚ Â Â y=0.2;
     Ã‚ Â Â   Ã‚ Â Â w=0.6;
     Ã‚ Â Â   Ã‚ Â Â h=0.1;
     Ã‚ Â Â };

and here is how it is called in a script

Code: [Select]
titlecut ["","black in",3]
TitleRsc ["starttext1","plain",8]
Title: Re:insert JPGs
Post by: desper8 on 15 Jan 2004, 15:48:21
cool cheers
Title: Re:insert JPGs
Post by: desper8 on 16 Jan 2004, 00:01:50
well the briefing pic worked fine

but
im having difficultys with the splash
Code: [Select]
class RscTitles
{
   titles[]={starttext1};
   
   class starttext1
   {
        idd=-1;
        movingEnable=0;
        duration=6;  
        fadein=2;  
      fadeout=2;
        name="starttext1";
        controls[]={"Screen","Titel1",};
       
        class Screen : RscStdText
        {
             style=48;
             text="MYPICTURE.JPG";
             x=0.2;
             y=0.2;
             w=0.6;
             h=0.1;
        };
so i added this to the description.ext

than to run it, at the start i made a
trigger. when west present
Code: [Select]
TitleRsc ["starttext1","plain",8]i get an error message: Resoures title starttext1 not found

were did i screw up?
Title: Re:insert JPGs
Post by: Planck on 16 Jan 2004, 00:11:03
I may be wrong, but, I think startext1 is supposed to be the text you want to display.

Substitute your text in there...try it anyway

Edit:......forget that.....I'm off target I think.

Planck
Title: Re:insert JPGs
Post by: desper8 on 16 Jan 2004, 01:33:54
its ok now i figured it from a prevoius post
thanx all any way