Jump to content
Sign in to follow this  
mindstorm

Display not showing

Recommended Posts

Can anyone help me with this. I'm trying to create a "target" marker for a spectator but I can't seem to get it to display:

CFG:

class RscPicture
{
access = 0;
type = 0;
idc = -1;
style = 48;//ST_PICTURE
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
font = "TahomaB";
sizeEx = 0;
lineSpacing = 0;
text = "";
fixedWidth = 0;
shadow = 0;
};

class DYN_COMTARGETDiag
{
idd = 4040;
name= "Commander targetter";
movingEnable = false;
enableSimulation = true;

class controls
{
	class Picture: RscPicture
	{
		text = "\a3\ui_f\data\IGUI\Cfg\TacticalDisplay\targettexture_gs.paa";
		x = 0.45;
		y = 0.45;
		w = 0.1;
		h = 0.1;
		colorText[] = {0.4,0.6745,0.2784,1.0};// doesn't influence picture?
	};
};
};

.sqf

(finddisplay 46) createDisplay "DYN_COMTARGETDiag";

I have no errors in my rpt so I have no clue what is wrong with above code.

Share this post


Link to post
Share on other sites

So I found out what was wrong.

Apparently dialogs need a couple more values:

duration = 9999999;
fadeIn = 0;
fadeOut = 0;

and I was missing the parent class rscTitles.

Share this post


Link to post
Share on other sites

Hmm wierd.

Can anyone tell me why this works:

cutRsc ["DYN_COMTARGETDiag","PLAIN", 0, false];

But this doesn not?

(finddisplay 46) createDisplay "DYN_COMTARGETDiag";

Share this post


Link to post
Share on other sites

I would realy like to know that as well because I was thinking about using this. The problem with oben dialog while still beeing a child of the former opend dialog is that i cant open a dialog above it but the parent dialog becomes invisible. I hope createDisplay could solve this but it doesnt, or at least I dont know if it does.

Share this post


Link to post
Share on other sites
Hmm wierd.

Can anyone tell me why this works:

cutRsc ["DYN_COMTARGETDiag","PLAIN", 0, false];

But this doesn not?

(finddisplay 46) createDisplay "DYN_COMTARGETDiag";

I think cutRsc creates a display and createDialog creates a dialog. Are you running that code on the top lines of init.sqf? Because I was recently doing that and the dialog was not opening, I added a sleep 0.1 and then it worked, probably needs some waitUntil{ something is ready }. Here's a sample mission I made for someone else where I use both cutRsc and createDisplay http://pastelink.me/dl/8f4b70 (To test it, put the mission folder in your ArmaProfileFolder/MPMissions, then open the game, click PLAY > MULTIPLAYER > NEW, create a new LAN game and select the Test2 mission)

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  

×