Home   Help Search Login Register  

Author Topic: Custom resource  (Read 1142 times)

0 Members and 1 Guest are viewing this topic.

TH

  • Guest
Custom resource
« on: 10 Jun 2004, 21:35:39 »
how do u make a custom resource.. like when you go into a trigger and effects, so a custom logo comes up?

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Custom resource
« Reply #1 on: 10 Jun 2004, 21:38:26 »
read Vektorbosons Dialog tutorial, then download can't-remember-names dialog creator.

:beat: *Gets Shot* :beat:

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Custom resource
« Reply #2 on: 10 Jun 2004, 21:45:25 »
Hmm, not sure he meant dialogues.  I think he just wants a pic.

If so, then you need to create the resource and save it in the mission folder as a jpg or something:  define it in description.ext, then of course call it when you want it.    I think there's a tute on this.

Anyway, here's a working example, cut and paste.

From description.ext

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 naughty2
   {
      idd=-1;
      movingEnable=0;
      duration=8;
      name="naughty2";
      controls[]={"Title"};
      class Title: RscPicture
      {
         text="naughty2.jpg";
         x=0.300000;
         y=0.000000;
         w=0.400000;
         h=1.000000;
      };
   };
};


Obviously there is a file called naughty2.jpg in the mission folder.

When you want the resource use the code

titleRsc ["naughty2","plain",0.1]
« Last Edit: 10 Jun 2004, 21:53:13 by macguba »
Plenty of reviewed ArmA missions for you to play

TH

  • Guest
Re:Custom resource
« Reply #3 on: 10 Jun 2004, 22:21:27 »
thx thats what i was looking for  ;D

TH

  • Guest
Re:Custom resource
« Reply #4 on: 11 Jun 2004, 04:26:33 »
what size does the pic need to be :-\

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Custom resource
« Reply #5 on: 11 Jun 2004, 11:57:32 »
The pic sides probably need to be a power of 2 in pixels.     You can make the pic any size you want on the screen, so it's fine to save it distorted if needs be.

There is a tute on this somewhere, I remember reading through the example and trying to relate it to what I was  doing.  Can't remember which one it is though.
Plenty of reviewed ArmA missions for you to play

TH

  • Guest
Re:Custom resource
« Reply #6 on: 11 Jun 2004, 15:45:21 »
it gives me this error Image user/ofp/missions/blablabla dimensions 1714x526 not 2^n
same error i always get sept 1714x526 is replaced by the pixels i had :-\

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Custom resource
« Reply #7 on: 11 Jun 2004, 16:22:41 »
The pic dimensions need to be in power of two, not dividable by two... So you can't use something like 32x96, or 1724x526....

Don't know how to explain this in english any better, but:
The dimensions need to be dividable by each other, like 32x64, resulting in an integer value of power of two (0,2,4,6,8,10...etc.)...

So you can use 32x32, 32x64, 64x64, 32x128, etc, etc....

If you want a pic that fills the whole screen, first make the pic in the dimensions of the screen, then re-size it something like 1024x1024, and then control it's size in OFP by adjustig the 'w' (width) and 'h' (height) values in class RscTitles...


And of course if I'm sharing mis-information here, please correct me... :P
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Custom resource
« Reply #8 on: 11 Jun 2004, 20:10:53 »
Well.......

Code: [Select]
The dimensions need to be dividable by each other, like 32x64, resulting in an integer value of  two (0,2,4,6,8,10...etc.)...
Should read:

Code: [Select]
The dimensions need to be powers of two, like 32x64, resulting in an integer value of power of two (2,4,8,16...etc.)...



 ::)


Planck
I know a little about a lot, and a lot about a little.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Custom resource
« Reply #9 on: 11 Jun 2004, 20:23:05 »
 ;D

thnx  :thumbsup:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.