Home   Help Search Login Register  

Author Topic: Custom Res Prob... (ITS NOTT OVER!!!)  (Read 2732 times)

0 Members and 1 Guest are viewing this topic.

Captain Winters

  • Guest
Custom Res Prob... (ITS NOTT OVER!!!)
« on: 21 Jul 2003, 00:23:40 »
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 cut2a
   {
      idd=-1;
      movingEnable=0;
      duration=18;
      name="Title";
      controls[]={"cut2a"};
      class cut2a: RscPicture
      {
         text="cut2a.jpg";
         x=0.200000;
         y=0.200000;
         w=0.600000;
         h=0.600000;
      }
   class credits1
   {
      idd=-1;
      movingEnable=0;
      duration=18;
      name="credits1";
      controls[]={"credits1"};
      class credits1: RscPicture
      {
         text="credits1.jpg";
         x=0.200000;
         y=0.200000;
         w=0.600000;
         h=0.600000;
      }
   class credits2
   {
      idd=-1;
      movingEnable=0;
      duration=18;
      name="credits2";
      controls[]={"credits2"};
      class credits2: RscPicture
      {
         text="credits2.jpg";
         x=0.200000;
         y=0.200000;
         w=0.600000;
         h=0.600000;
      }
   class presents
   {
      idd=-1;
      movingEnable=0;
      duration=18;
      name="presents";
      controls[]={"presents"};
      class presents: RscPicture
      {
         text="presents.jpg";
         x=0.200000;
         y=0.200000;
         w=0.600000;
         h=0.600000;
      };
   };
};

That's my des.ext. For some reason none of the cutRSC's want to show up... How come? I call it using:

cutRSC["title","PLAIN"]
~6

What am I doing wrong?
Thanks in advance :)


Tanks! 8)
« Last Edit: 31 Jul 2003, 00:48:48 by Captain Winters »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Custom Res Prob...
« Reply #1 on: 21 Jul 2003, 01:31:14 »
class cut2a
   {
      idd=-1;
      movingEnable=0;
      duration=18;
      name="Title";
      controls[]={"cut2a"};
      class cut2a: RscPicture
      {
         text="cut2a.jpg";
         x=0.200000;
         y=0.200000;
         w=0.600000;
         h=0.600000;
      }

If you're using:

cutRSC["title","PLAIN"]

Then you're trying to reference the resource I've put up above right?

While the 'name' of that resources is "title", the class name is cut2a.
If you want to use the cutrsc command on it, you'll need to use the class name, rather than the 'name' name ;)

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #2 on: 21 Jul 2003, 02:03:43 »
no no no! that was just an example. I'm using the correct name...

Tanks! 8)

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Custom Res Prob...
« Reply #3 on: 21 Jul 2003, 02:20:02 »
Righto... so either the file is not being found (the actual resource file I mean), or you might be using a cuttext command too soon after you call the resource.

Try putting a pause after you call the resource, or use titlersc instead of cutrsc...

Anyway, I should probably stop forum whoring and get to work... ;D

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #4 on: 21 Jul 2003, 02:35:03 »
Damn it. ODesn't work either  :(
This is how i call them in my cam script...

;=== 17:36:22
_camera camSetTarget [-77532.08,-38447.04,-34986.92]
_camera camSetPos [4292.26,6815.36,40.15]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
cutRSC["credits1","PLAIN"]
~15.5

;=== 16:25:07
_camera camSetTarget [-95542.22,2268.52,341.47]
_camera camSetPos [4356.49,6767.04,9.54]
_camera camSetFOV 0.700
_camera camCommit 25
@camCommitted _camera
cutRSC["credits2","PLAIN"]
~14.5

;=== 17:21:15
_camera camSetTarget [-6317.09,5918.37,-98962.40]
_camera camSetPos [4194.09,6782.62,68.71]
_camera camSetFOV 1.396
_camera camCommit 4
@camCommitted _camera
cutRSC["presents","PLAIN"]
~4
;=== 17:21:15
_camera camSetTarget [-6317.09,5918.37,-98962.40]
_camera camSetPos [4194.09,6782.62,68.71]
_camera camSetFOV 1.396
_camera camCommit 4
@camCommitted _camera
cutRSC["title","PLAIN"]
~10.5

...? I don't havethe slighest clue to whats wrong?

Tanks! 8)

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Custom Res Prob...
« Reply #5 on: 21 Jul 2003, 06:36:04 »
hmm... maybe try putting a space in between the RSC and the ["... eg.

cutrsc ["credits1","PLAIN"]

? ;)

Offline MI_Fred

  • Members
  • *
  • AA
    • OFP Team Finlanders
Re:Custom Res Prob...
« Reply #6 on: 21 Jul 2003, 13:53:36 »
Ok, I'll throw in some too.  :D
colorBackground[]={0,0,0,0};
size=0;
The pics wouldn't obviously show if those infact had some effect. But I doubt it's that. Double check that type=0; and style=48; are valid ones for this. I'd grab a file where they are defined and use 'em.

* MI_Fred hammers titleRsc down Captain Winters' throat
they are titleRsc's... (class RscTitles)  :o

There's gooks over there, there's mines over there, and watch out those goddamn monkeys talk, I'll bite ya.

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #7 on: 21 Jul 2003, 16:20:51 »
Okay, I tried calling it with 'titleRSC ["",""]' but that didn't work. I aswell tried with 'cutRSC ["",""]' that too didn't work.
When I try to call it I get the error you can see on the attachment.
I think it may have to do with me defining which RSC's I'm gona be using, sorta like when you define your music tracks...
(credits1 is the first RSC I pull up...)
Any more ideas?

Tanks! 8)
« Last Edit: 21 Jul 2003, 16:22:02 by Captain Winters »

Gameer_77

  • Guest
Re:Custom Res Prob...
« Reply #8 on: 21 Jul 2003, 20:40:57 »
Here's a snippet from my .ext in a mission:

Code: [Select]

class RscTitles
{
   class Gameer36
   {
      name = "Gameer36";
      duration = 1;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
         text
      };
      class text:RscText
      {
         style = ST_LEFT;
         lineSpacing = 1.0;
         text = "Sweep-Stake";
         x = 0.34; y = 0.27; w = 0.6; h = 0.4;
         colorText[] = {0.95, 0.95, 0.95, 1};
         font =  FontBOOK;
         size = 2.25;
      };
   };



That works when you do "cutrsc ["Gameer36","plain"]".

Try that as a template.

Also, remember you need to have all the defines etc. at the top.

Gameer

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #9 on: 21 Jul 2003, 23:30:24 »
Hmmm, is that defing a custom picture or custom text?

Tanks! 8)

Gameer_77

  • Guest
Re:Custom Res Prob...
« Reply #10 on: 22 Jul 2003, 13:24:43 »
Oh, text...but you can change it so it's a picture by replacing the "text" with pic.jpg or what-not.

It was really to give an idea of how to lay it out.

For example, 2 have two seperate pics:

Code: [Select]

class RscTitles
{
   class Picture1
   {
      name = "Gameer36";
      duration = 1;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
         text
      };
      class text:RscText
      {
         style = ST_LEFT;
         lineSpacing = 1.0;
         text = picture1.jpg;
         x = 0.34; y = 0.27; w = 0.6; h = 0.4;
         colorText[] = {0.95, 0.95, 0.95, 1};
         font =  FontBOOK;
         size = 2.25;
      };
   class Picture2
   {
      name = "Gameer36";
      duration = 1;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
         text
      };
      class text:RscText
      {
         style = ST_LEFT;
         lineSpacing = 1.0;
         text = picture2.jpg;
         x = 0.34; y = 0.27; w = 0.6; h = 0.4;
         colorText[] = {0.95, 0.95, 0.95, 1};
         font =  FontBOOK;
         size = 2.25;
      };
   };



Then to show the pics would be "cutrsc ["picture1","plain"]" and "cutrsc ["picture2","plain"].

For pictures, you might have to mess around with the height ("h") and width ("w") values.

Gameer
« Last Edit: 22 Jul 2003, 13:26:28 by Gameer »

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #11 on: 22 Jul 2003, 16:24:41 »
okay this is what i put together:

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 cut2a
  {
      name = "cut2a";
      duration = 16.5;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
        cut2a
      };
      class cut2a:RscPicture
      {
        style = ST_LEFT;
        lineSpacing = 1.0;
        text = cut2a.jpg;
        x = 0.200000; y = 0.200000; w = 0.600000; h = 0.600000;
        colorText[] = {0.95, 0.95, 0.95, 1};
        font =  FontBOOK;
        size = 2.25;
      };
  class credits1
  {
      name = "credits1";
      duration = 16.5;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
        credits1
      };
      class credits1:RscPicture
      {
        style = ST_LEFT;
        lineSpacing = 1.0;
        text = credits1.jpg;
        x = 0.200000; y = 0.200000; w = 0.600000; h = 0.600000;
        colorText[] = {0.95, 0.95, 0.95, 1};
        font =  FontBOOK;
        size = 2.25;
      };
  class presents
  {
      name = "presents";
      duration = 10;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
        presents
      };
      class presents:RscPicture
      {
        style = ST_LEFT;
        lineSpacing = 1.0;
        text = presents.jpg;
        x = 0.200000; y = 0.200000; w = 0.600000; h = 0.600000;
        colorText[] = {0.95, 0.95, 0.95, 1};
        font =  FontBOOK;
        size = 2.25;
      };
  class credits2
  {
      name = "credits2";
      duration = 16.5;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
        credits2
      };
      class credits2:RscPicture
      {
        style = ST_LEFT;
        lineSpacing = 1.0;
        text = credits2.jpg;
        x = 0.200000; y = 0.200000; w = 0.600000; h = 0.600000;
        colorText[] = {0.95, 0.95, 0.95, 1};
        font =  FontBOOK;
        size = 2.25;
      };
  };

but i still get a 'Resource title credits1 not found' error. I have all the pictures in my mission folder, if I read what Sui wrote a long time back, everything should work fine... but it isn't  :(

Tanks! 8)

Gameer_77

  • Guest
Re:Custom Res Prob...
« Reply #12 on: 22 Jul 2003, 17:09:59 »
Why don't you try it with just one for now? ::)

I can't read through all that right now, so try this and tell me what happens:

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 credits1
  {
      name = "credits1";
      duration = 16.5;
      idd = -1;
      movingEnable = false;
      fadein=0;
      controls[]=
      {
        credits1
      };
      class credits1:RscPicture
      {
        style = ST_LEFT;
        lineSpacing = 1.0;
        text = credits1.jpg;
        x = 0.200000; y = 0.200000; w = 0.600000; h = 0.600000;
        colorText[] = {0.95, 0.95, 0.95, 1};
        font =  FontBOOK;
        size = 2.25;
      };
  };

Have you got all the defines at the top?

Gameer

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #13 on: 22 Jul 2003, 17:38:07 »
Yea I have that....  :'(

Tanks! 8)

Captain Winters

  • Guest
Re:Custom Res Prob...
« Reply #14 on: 22 Jul 2003, 17:38:30 »
O One, OK. When I get back from football then

Tanks! 8)