OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ElemenS on 14 Sep 2002, 12:56:16

Title: Add Resource Pic (logo)
Post by: ElemenS on 14 Sep 2002, 12:56:16

How to show a resource in a camscript ?
 ???
Need to have a custom logo picture as recource,
do i have to define it in desc.ext too as class resource or sumtin ?

Folder to add it et. all info needed
thanks !

 :-\
Title: Re:Add Resource Pic (logo)
Post by: GalComT on 14 Sep 2002, 13:11:10
Define it like this in your description.ext:

class RscStdText
{
   type=0;
   idc=-1;
   style=2;
   colorBackground[]={0,0,0,0};
   colorText[]={1,1,1,1};
   font="TahomaB24";
   size=1;
};
class RscTitles
   {
   titles[]={"Bus"};
   class Bus
      {
      idd=-1;
      movingEnable=0;
      duration=6;
      fadein=1;
      name="Samplersc";
      controls[]={"Bus00"};
      class Bus00
         {
         type=0;
         idc=-1;
         style=48;
         
         colorBackground[]={0,0,0,0 };
         colorText[]={1,1,1,1};
      
         font="TahomaB24";
         size=1;
         text="Bus.jpg";
         x = 0.15;
         y = 0.2;
         w = 0.7;
         h = 0.4
      };
   };
};


into your mission folder put a picture named "bus.jpg"

Greatings
GalComT
Title: Re:Add Resource Pic (logo)
Post by: ElemenS on 14 Sep 2002, 13:35:04




 :-\

My *.jpg is 800x600, how do i get it to show on fullscreen ?

i only get a stretched ugly thingy working, if i increase size it gives a error msg:

imagename.jpg 800x600 instead of 2^n

wthell is 2^n ?

why wont it just show my damn pic in the center as 800x600 ?
and in the desc.ext , what are these factors doing?

class pic1: RscPicture
      {
         text="bus.jpg";
                     x=0.5;
         y=0.5;
         w=0.5;
         h=0.5;
      };
 
x, y, w, h, ?
do they set the position of my pics sw,nw,ne,se corners ?
or zoom?

Explenations would be good,
we have brains so let us use them.

 :P
Title: Re:Add Resource Pic (logo)
Post by: GalComT on 15 Sep 2002, 10:57:03
2^n means that it has to be 2 to the power of n:

2,4,8,16,32,64,128,256,512,1024,...2^n

That means you can use any size without having problems as long as it is one of those above. (some others funktion as well, but these ones allways work)

Greatings
GalComT