Jump to content
Sign in to follow this  
raptor 6 actual

Another Picture as Dialog Background...Sorry

Recommended Posts

Ok, I know that there are about no less than fifty threads pertaining to this issue, and I have used the search function until I broke my mouse, but seriously, I have looked at numerous examples and have over 30 bookmarked pages for reference on dialogs.

My problem is this. I have a 9 Line Rite-in-rain "TYPE" of card I want to use as a background when my dialog comes up. It's already got an alpha channel made for it, I believe I scaled it down to 512 x 512 pixels, so I believe that's all good to go.

I have this in the description.ext

class raptor_9line {
idd = -1;
movingEnable = false;
onLoad = "";
controlsBackground[] = {};
objects[] = {};
controls[] = {"noartback"};

class noartback {
	idc = -1;
	type = CT_STATIC;
	style = ST_PICTURE;
	colorBackground[] = { };
	colorText[] = { };
	font = Bitstream;
	sizeEx = 0.023;
	moving = true;
	x = -0.0; y = -0.0;
	w = 1.0; h = 1.0;
	text = "dialog\9_line.paa";
};
}; 

All I get when I call it up is a white box. I have even tried using a different .paa file from Mando's Missle addon (which I had given him) and still the white box. I have tried defining RSCPicture, RSCText, etc., etc. I have played around with the colorBackground and colorText fields...all either getting the white box or just the foreground of the game but with no movement allowed by player (indicating that the game did call up the script) Anyways, I've tried so many different variables trying to do a process of elimination to determine the problem.

Again, I don't consider myself lazy in the terms of the search function, and I hate starting a new thread for this, but I finally have started turning grey over this. The background image is wanted because I can customize it later (personal preference) hence the reason I don't just remake a 9-Line format as in VBS 2.

I appreciate the understanding and respect the rules of the Forum, but please someone tell me what I'm doing wrong. BTW, I even dissected other peoples' dialogs but still "No joy!"

Edited by Raptor 6 Actual
typo

Share this post


Link to post
Share on other sites

Can't see any obvious mistakes, but I think the colors should be defined.

When I use screen_blood_1_ca.paa (512x512) it works for me, created via createDialog.

When going back and forth like this, always save the mission before next retry. It may also be an idea to "force resource reload". A change in w/h tend to do the trick for me.

Not sure if this helps, but...

Share this post


Link to post
Share on other sites

hmmm

change

controls[] = {"noartback"};
to
controls[] = {noartback};
im not sure if thats any issue tho.

also i think

font = Bitstream;

should be

font = "Bitstream";

also change

        
colorBackground[] = { };
colorText[] = { };

to

        
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};

also i see you have set

movingEnable = false;

while later on you use

moving = true;

the latter one overwrites the first one afik.

and yes. check that you picture is in valid size

example 32x512 is valid. 128x256 is valid etc etc

also. are you sure

CT_STATIC and ST_PICTURE is defined?

type = 0;

style = 48;

also keep in mind that every time you make changes to the dialog code

you need to load the mission over again, this is ingeneral for description, all changes made there require you to load the mission over again.

Edited by nuxil

Share this post


Link to post
Share on other sites

Yeah it's gotta be CT_STATIC and ST_PICTURE lacking definition (they are already defined in the mission I tested it in). As for the quote usage, isn't that just common practice? They work for me without any error messages, and I think the engine interpretor converts it to the appropriate types. But yes, probably a good idea to do so.

Ref: At the end of the day.

Share this post


Link to post
Share on other sites

Forgot to send you common.hpp, sorry. Did send you a new working template last night!

Share this post


Link to post
Share on other sites

@CarlGustaffa i dont know if it's common practice or not. i always used quotes and alway though it should be like that hehe.

and even if the engine interpretor converts it to the appropriate types

there is no need to give the engine unnecessary work ;)

Share this post


Link to post
Share on other sites

Yeah, I agree. First place I noticed this weird syntax was when looking at some sound config, and I thought wtf is this? Turns out even BIS in their configs has some of this present (Never noticed it). It's then like "4 10" (i.e. in ambient random parameters) which I didn't know what to make of until I happened to stumble upon that biki page.

Share this post


Link to post
Share on other sites

Alright, thanks everyone, it did get fixed with defining CT_STATIC and ST_PICTURE. I appreciate the help.

So anyone else needing the answer, make sure you define your Types and Styles up at the top of your document:

#define CT_STATIC 0

#define ST_PICTURE 48

Thanks again everyone.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×