OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: shadow99 on 03 Aug 2004, 02:49:22
-
A few weeks ago, I asked people how to insert my own title. Macguba kindly answered with this:
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.500000;
h=1.000000;
};
};
};
To activate it, I use:
titleRsc ["naughty2","plain",0.1]
But yet when it is supposed to come up in my intro, the game claims "Resource naughty2 cannot be found" or something like that.
However, it's in my missions folder and defined in description.ext. What's wrong?
But it claims my "naughty2.jpg" cannot be found when I'm testing my intro. However, it's defined in description.ext and it's in my missions folder.
What is wrong?
-
did you name it naughty2? and is it a jpg?
-
Yes, I did.
-
That's odd .... I cut and pasted it and it works for me.
Ah, I found this extra bit
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.500000;
h=1.000000;
};
};
};
Dunno what its for, maybe you need the picture bit to make the other bit work. Don't ask me, I just copied it all from a tutorial somewhere. If the pic file is in the right place with the right name then "not found" usually means there is something wrong in the description.ext.
-
Thanks. It seems I got somewhere. Now it's complaining about dimensions. What ARE the dimensions, anyway? What do I have to resize my picture to?
It said: "<Directory of .jpg> dimensions <dimensions> not 2^n" or something very similar.
-
2, 4, 8, 16, 32, 64, 96, 128, 196, 256, 512, 1024 have worked for me. I'm sure there are more.
:beat: *Gets Shot* :beat:
-
Now it's saying it can't load the textures!!!!!!!111!!!one!@21!!
When does it end?
-
Both sides of the pic must be a power of 2 in pixels. Armsty has given a pretty good list apart from 96 and 196. ::)
-
I have... 512x512.
"<Directory of .jpg> title cannot load texture"
or something like that.
-
Oi, its 192 and 96. Sorry.
And it works.
I've tried it.
It works.
Bwahahahhahahaha! ;D
-
That's blasted tiny... Oh well...
-
Huh what?
Now I'm confused...?
-
It doesn't really matter what size the file is saved: you define how big it is on the screen in descption.ext anyway.
Don't know the texture error I'm afraid.
-
To activate it, I use:
titleRsc ["naughty2","plain",0.1]
Also change the ,0.1 with something bigger,like 5
-
0.1 brings it up for a set amount of time anyway, I believe. With the original CWC logo it did... 5 seconds or so...