PDA

View Full Version : RscTitles and RscText



Celery
Dec 16 2006, 23:24
I'm busy making intros and other things that require some fancy writing and user interfaces. When I used parts of an OFP description.ext to have a template for an on-screen title splash and spectator UI, ArmA started giving errors. I got RscTitles fixed so it doesn't give any errors, but now it doesn't work. The text doesn't show.

This is how the unfinished product looks like now:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class RscTitles
{
titles&#91;&#93;={starttext1};

class starttext1
{
idd=-1;
movingEnable=0;
duration=6;
fadein=0;
fadeout=0;
name=&#34;starttext1&#34;;
controls&#91;&#93;={&#34;Title1&#34;,&#34;Title2&#34;};

class Title1 &#58; RscStdText
{
text=&#34;WARNING&#34;;
colorText&#91;&#93;={0.9,0,0,1};
font=&#34;TahomaB48&#34;;
sizeEx=1.0;
x=0.1;
y=0.42;
w=0.8;
h=0.3;
};
class Title2 &#58; RscStdText
{
text=&#34;This map contains&#34;;
colorText&#91;&#93;={0.9,0.9,0.9,1};
font=&#34;TahomaB48&#34;;
sizeEx=0.2;
x=0.1;
y=0.32;
w=0.8;
h=0.3;
};
};
};[/QUOTE]

I&#39;m trying to bring it up with the TitleRsc ["starttext1","plain",6] command but nothing shows up. Please help&#33;

Lolsav
Dec 17 2006, 15:52
Maybe this can help you. I got paa files showing ingame, but they have do be 256x256.

Example in code below:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class RscTitles
{

titles&#91;&#93; =
{
lolsav, maria
};
class lolsav
{
idd=-1; // ID ... always -1
movingEnable = false; // always false
duration=6; // time of the effect &#40;in seconds&#41;
name = &#34;lolsav&#34;; // name in editor
sizeEx = 256;            // Size required for ARMA

// max. three arrays - controls, controlsBackground &#40;optional&#41;, objects &#40;optional&#41;
// for now - we will only use &#34;controls&#34;

controls&#91;&#93;=
{
Picture
};

class Picture &#58; RscPicture // For pictures
{
x = 0.25; y = 0.33; w = 0.5; h = 0.33;
text = &#34;pictures&#92;lolsav.paa&#34;; // Your picture in the mission directory
sizeEx = 256;

};
};
class maria
{
idd=-1; // ID ... always -1
movingEnable = false; // always false
duration=6; // time of the effect &#40;in seconds&#41;
name = &#34;maria&#34;; // name in editor
sizeEx = 256;            // Size required for ARMA

// max. three arrays - controls, controlsBackground &#40;optional&#41;, objects &#40;optional&#41;
// for now - we will only use &#34;controls&#34;

controls&#91;&#93;=
{
Picture
};

class Picture &#58; RscPicture // For pictures
{
x = 0.01; y = 0.15; w = 0.33; h = 0.33;
text = &#34;pictures&#92;maria.paa&#34;; // Your picture in the mission directory
sizeEx = 256;

};

};


};[/QUOTE]

To make it show up ingame, in my case during the intro, i have set this line command:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cutRsc &#91;&#34;maria&#34;,&#34;PLAIN&#34;,2&#93;[/QUOTE]

Be carefull where you place it tought, the intro commands are very picky. You need to insert the CutRsc command before a new PrepareTarget line.

Finally one last recommendation: In my description.ext file i have set the RscTitles Class as last. So if its not your case the example above has a "};" signal extra. In that case remove one and it should work.

Hope i was clear....