Home   Help Search Login Register  

Author Topic: [SOLVED] Display picture by trigger (Description.ext problem)  (Read 1788 times)

0 Members and 1 Guest are viewing this topic.

Offline Binary

  • Members
  • *
Hello :)

I'm pulling my hair out - I'm trying to get a trigger to display a picture, and even though theres lots of threads here already, about how to include pictures in the description.ext i just darn can't get my head around it, ArmA simply constantly tells me that the resource don't exist. I'm hoping someone have a simple "sample" of how this is done.. Basicly - i have 1 picture, that needs to be displayed by a trigger and timeout after 5 seconds.

Hoping someone out there can help :)
« Last Edit: 03 Feb 2009, 10:32:04 by Binary »
"Ah.. Home sweet hell !" - Al Bundy

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Display picture by trigger (Description.ext problem)
« Reply #1 on: 02 Feb 2009, 23:10:38 »
Hi,

Download my mission Sum of all Fears.  :D
It uses a rsc and works well.
It's shown through an action, but that shouldn't matter.

http://www.ofpec.com/forum/index.php?topic=31362.0

Otherwise, here is the description.ext part that handles the rsc:

Code: [Select]
class RscTitles
{

class rgbAalpha
{
idd=-1;
movingEnable=true;
duration=10;
    fadein = 3;
    fadeout = 3;
name="rgbAalpha";
controls[]={"rgbAalpha"};

class rgbAalpha
{
x = 0.3; y = 0.2;
w = 0.4; h = 0.4;
type = 0;
idc = -1;
style = 48;
colorBackground[] = {0, 0, 0, 0};
colorText[] = {1, 1, 1, 1};
font = BitStream;
sizeEx = 0;
lineSpacing = 0;
access = ReadAndWrite;
text = "rgbAalpha.paa";
};
};

};

rgbAalpha is the name of the paa image.

In the action script (or trigger in your case):

Code: [Select]
titlersc ["rgbAalpha","plain"]
Laggy
« Last Edit: 02 Feb 2009, 23:18:57 by laggy »
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Display picture by trigger (Description.ext problem)
« Reply #2 on: 02 Feb 2009, 23:17:38 »
Code: [Select]
// Description.ext
class RscTitles
{
   class the_picture
   {
      idd = 100;
      movingEnable =  1;
      duration     =  5;
      fadein       =  0;
      fadeout      =  0;
      name = "the_picture";

      class controls
      {
  class THE_PICTURE
  {
     idc = 101;
             type = 0;
             style = 48;
             font = "Bitstream";
             sizeEx = 0.04;
             colorBackground[] = {0, 0, 0, 0};
             colorText[] = {0.5, 1, 0.5, 1};
             text = "the_picture_file.paa";
             x = 0.5;
             y = 0.5;
             w = 0.3;
             h = 0.3;
          };
      };
   };
};

Change the coords and picture file at will, save the .ext, reload your mission in the editor and you should have the_picture as one of the resources availables for triggers effects.

Offline Binary

  • Members
  • *
Re: Display picture by trigger (Description.ext problem)
« Reply #3 on: 02 Feb 2009, 23:47:18 »
Thank you both very much - this is perfect   :)
Is it possible to also use JPEG's instead of paa/pac?
« Last Edit: 03 Feb 2009, 08:35:58 by Binary »
"Ah.. Home sweet hell !" - Al Bundy

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Display picture by trigger (Description.ext problem)
« Reply #4 on: 02 Feb 2009, 23:58:11 »
Yeah, it looks like you can also use JPGs.

Beware that if you use Mandobles example you will end up with a green-ish picture. This has to do with the colorText:

green: colorText[] = {0.5, 1, 0.5, 1};
normal: colorText[] = {1, 1, 1, 1};
try { return true; } finally { return false; }

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Display picture by trigger (Description.ext problem)
« Reply #5 on: 03 Feb 2009, 00:08:29 »
What's wrong with green-ish pictures??  :P

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Display picture by trigger (Description.ext problem)
« Reply #6 on: 03 Feb 2009, 00:20:10 »
Oh, nothing. I love green-ish pictures... really! It's only that I converted my pic like 10 times before I realized what causes this ... uhm, artistic look. ;)
try { return true; } finally { return false; }

Offline Binary

  • Members
  • *
Just thought I'd post the result for laughs :)

Mission objective is to locate a downed UH60 carying our CO's coffee cup.

"Ah.. Home sweet hell !" - Al Bundy

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
 :D  Nice.  I love this mission concept.  Your team risks life and limb for some dumbass REMF's coffee cup...
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...