Home   Help Search Login Register  

Author Topic: how to show an image  (Read 1899 times)

0 Members and 1 Guest are viewing this topic.

seanver

  • Guest
how to show an image
« on: 26 Aug 2002, 18:50:38 »
I wonder how can I show an image on the center of the screen like in Resistance when you see the timetable at the bus stop. Anyone can explain me thoroughly how to do that?

Gameer_77

  • Guest
Re:how to show an image
« Reply #1 on: 26 Aug 2002, 22:27:15 »
BIS's title was made with the Dialog Scripting (kinda HTML) technique but you can do it with a Resource thingymagig. But since i dont know how to do that heres the dialog scripting way:

First off, dont let this overwhelm you, its really quite easy when you get the hang of it. Ok, make a description.ext file and at the top put this :

#define ST_PICTURE   48

Then somewhere below put this:

class RscText
{
        type = CT_STATIC;
        idc = -1;
        style = ST_LEFT;
        colorBackground[] = {0, 0, 0, 0};
        colorText[] = {1, 1, 1, 1};
        font = FontM;
        sizeEx = 0.04;
};

Ok, now below that put this:

class RscTitles
{
   class picture
   {
      name = "picture";
      duration =8;
      idd = -1;
      movingEnable = true;

      controls[]=
      {
         picture
      };
      class picture : RscText
      {
         style = ST_PICTURE;
         lineSpacing = 1.0;
         text = "nameofpic.jpg";
         x = 0.068; y = 0.10; w = 0.85; h = 0.8;
         font = FontMAINCZ;
         sizeEx = 1.5 * 0.1;
         size = 1.7;
      };
   };

Ok, let me explain the bits you edit; Change the "Duration" part to how long you want the picture to appear for.

Change the name  text = "nameofpic.jpg"; to the name you want. (I'm not sure what format its to be in. Stick with jpg.)

Now the x,y,w,h changes the height etc. Mess about with that a little to get the pic right. Make sure to press save then save it otherwise the changes wont be made.

Now, in the trigger or scipt put this: cutRsc ["picture", "PLAIN"].

And there we go. It should work. Tell me if not.

Anyone else adept at Dialog Scripting see any probs with this? *Ahem* Vektor *Ahem*  ;)

Visit http://home.arcor.de/vektorboson/tuts.html and download the Dialog Tutorial for more info. (Please note that there is an english version included)

8) PEACE

seanver

  • Guest
Re:how to show an image
« Reply #2 on: 26 Aug 2002, 22:40:36 »
thanks, ill try it out

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:how to show an image
« Reply #3 on: 26 Aug 2002, 22:49:20 »
jpg works fine - used it alot
Proud Member of the Volunteer Commando Battalion

Pow3r

  • Guest
Re:how to show an image
« Reply #4 on: 26 Aug 2002, 22:50:44 »
I was hoping you could shed some light on specifically what you're trying to do here.  I surf the forums just to find out new things to do that I haven't thought of as of yet and I'm wondering, since I don't have the Resistance extension yet, if what you're trying to do works in vers 1.46 of ofp and if you could tell me what you're trying to do more specifically?  I'd really appreciate it.  Thanks much. :)

Gameer_77

  • Guest
Re:how to show an image
« Reply #5 on: 26 Aug 2002, 23:01:13 »
Fraid this method only works with res, there are other methods but this is the only one i know of.

Basically he is asking how to show a picture, and ive showed him the 'Dialog Scripting' method. Visit the Url above to find out more about it. (If you have res ;) Sorry)

 8)PEACE

seanver

  • Guest
Re:how to show an image
« Reply #6 on: 27 Aug 2002, 02:13:35 »
Works perfectly  :) although the picture size must be a power of two