OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Burn on 07 Jul 2003, 19:23:11

Title: Resource definition...
Post by: Burn on 07 Jul 2003, 19:23:11
Hi all :wave:. I really hope u can help me with this one... maby Sui that got me started with this in the first place ::)...

Code: [Select]
class RscPicture
        {
           type=0;
           idc=-1;
           style=48;
           colorBackground[]={0,0,0,0};
         colorText[]={1,1,1,1};
         font="tahomaB24";
         size=0;
        };

class RscTitles
        {
       
           class Title
           {
              idd=-1;
              movingEnable=0;
              duration=4;
              name="Title";
              controls[]={"Title"};
       
              class Title: RscText
              {
                 text="Title.jpg";
                 x=0.150000;
                 y=0.150000;
                 w=0.700000;
                 h=0.700000;
              };
           };
           class Overkill
           {
              idd=-1;
              movingEnable=0;
              duration=4;
              name="Overkill";
              controls[]={"Overkill"};
       
              class Title: RscText
              {
                 text="Overkill.jpg";
                 x=0.000000;
                 y=0.150000;
                 w=1.000000;
                 h=0.700000;
              };
           };
           class Brought
           {
              idd=-1;
              movingEnable=0;
              duration=4;
              name="Brought";
              controls[]={"Brought"};
       
              class Title: RscText
              {
                 text="Brought.jpg";
                 x=0.000000;
                 y=0.150000;
                 w=1.000000;
                 h=0.700000;
              };
           };
           class hint4
           {
              idd=0;
              movingEnable=0;
              duration=15;
              name="hint4";
              controls[]={"hint4"};
       
              class hint4: RscText
              {
                 style="16+2+512";
                 lineSpacing=0.750000;
                 text="$STRR_RES4";
                 x=0.00000000;
                 y=0.85000000;
                 w=0.900000;
                 h=0.500000;
                 colorText[]={0.5,0,0,1};
                 font="tahomaB36";
                 size=0.6;
              };
      };
   };
};    


When the above code is typed in the .ext I get an error :'(: see the attached file below...
Title: Re:Resource definition...
Post by: Sui on 08 Jul 2003, 02:41:12
Hey mate...

Pull out your text editor (notepad or whatever) and try replacing every "RscText" with "RscPicture"

The problem is that you're trying to use a parent class called RscText, but you haven't define that parent class.

I think all your resources there are pictures aren't they? So replacing the text with picture should sort it... ;)
Title: Re:Resource definition...
Post by: Burn on 08 Jul 2003, 07:13:14
 :wow:It worked :D... Where would I be without you mate ::), STUCK IN THE SEWERS OF EDITING :o... THAT'S where ;D.
And thanks alot for your 5 second Custom Resource Tutorial :D...
The only mistake I did, was that I didn't copy n' paste exactly everything :tomato: ;D.

thanks alot for your help mate. :thumbsup:
cheers. :cheers: