OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Binary on 02 Feb 2009, 23:06:15
-
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 :)
-
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:
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):
titlersc ["rgbAalpha","plain"]
Laggy
-
// 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.
-
Thank you both very much - this is perfect :)
Is it possible to also use JPEG's instead of paa/pac?
-
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};
-
What's wrong with green-ish pictures?? :P
-
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. ;)
-
Just thought I'd post the result for laughs :)
Mission objective is to locate a downed UH60 carying our CO's coffee cup.
(http://www.nanosoft.dk/21vb/img/cofeecup.jpg)
-
:D Nice. I love this mission concept. Your team risks life and limb for some dumbass REMF's coffee cup...