Jump to content
Sign in to follow this  
das attorney

3D objects in dialogs

Recommended Posts

I'm making a dialog for interaction with objects and wanted to know if you can add a 3D object into the dialog, (so you can spin it about in it's window and inspect it - then click some other buttons to interact with it).

I can make a 3D object appear when firing the dialog, but as it's in the objects group, it overrides the rest of the dialog controls and all you can do is drag the object about on screen. You can't click on any of the other dialog controls.

There's not much information on this that I can see - this first WIKI example crashes if you try to load it due to config info being defined twice.

http://community.bistudio.com/wiki/DialogControls-Objects

I'm aware that you can set up an object under controls (it doesn't crash) but the object won't load up into it's assigned control window.

I'm not sure this is even possible. Thought I'd ask here instead of wasting the whole night trying something that won't even work, or depboing DayZ SA to see how they do it in the main menu Gah!

Some wonky code (basically I want the tyre to appear as an object in the control for class horde_gui_object):

class Horde_Dialog_Main
{
idd = -1;
movingEnable = true;
   controlsBackground[] = {}; 
class Objects
{
	class Horde_Tyre: horde_Object
	{
		scale = 0.5;
		direction[] = {1,0,0}; // {0,0,1};
		up[] = {0,0,1}; // {0,1,0};
		shadow = 1;
		idc = 101;
		type = 80;
		model = "\A3\Structures_F\Civ\Garbage\Tyre_F.p3d";
		selectionDate1 = "date1";
		selectionDate2 = "date2";
		selectionDay = "day";
		x = 0.7;
		xBack = 0.7;
		y = 0.12;
		yBack = 0.12;
		z = 0.22;
		zBack = 0.22;
		inBack = 0;
		enableZoom = 0;
		zoomDuration = 1;
		waitForLoad = 0;
	};
};
class Controls
{
	class horde_gui_background: horde_RscPicture
	{
		idc = 2200;
		x = 0.215625 * safezoneW + safezoneX;
		y = 0.164 * safezoneH + safezoneY;
		w = 0.56875 * safezoneW;
		h = 0.672 * safezoneH;
	};
	class horde_gui_object: horde_object
	{
		idc = 1200;
		text = "";
		x = 0.354167 * safezoneW + safezoneX;
		y = 0.234 * safezoneH + safezoneY;
		w = 0.240625 * safezoneW;
		h = 0.392 * safezoneH;
	};
	class horde_gui_vertical_slider: horde_RscPicture
	{
		idc = 1201;
		text = "#(argb,8,8,3)color(1,1,1,1)";
		x = 0.259375 * safezoneW + safezoneX;
		y = 0.234 * safezoneH + safezoneY;
		w = 0.065625 * safezoneW;
		h = 0.392 * safezoneH;
	};
	class horde_gui_buttonSpace: horde_RscPicture
	{
		idc = 1202;
		text = "#(argb,8,8,3)color(1,1,1,1)";
		x = 0.259375 * safezoneW + safezoneX;
		y = 0.654 * safezoneH + safezoneY;
		w = 0.48125 * safezoneW;
		h = 0.154 * safezoneH;
	};
	class horde_gui_available_part: horde_RscPicture
	{
		idc = 1203;
		text = "#(argb,8,8,3)color(1,1,1,1)";
		x = 0.623958 * safezoneW + safezoneX;
		y = 0.234 * safezoneH + safezoneY;
		w = 0.116667 * safezoneW;
		h = 0.182 * safezoneH;
	};
	class horde_gui_assigned_tool: horde_RscPicture
	{
		idc = 1204;
		text = "#(argb,8,8,3)color(1,1,1,1)";
		x = 0.623958 * safezoneW + safezoneX;
		y = 0.444 * safezoneH + safezoneY;
		w = 0.116667 * safezoneW;
		h = 0.182 * safezoneH;
	};
};
};

Share this post


Link to post
Share on other sites

Just a quick untested idea: what if you put it under controlBackground? This way the controls can't loose focus to the object, which is shown in the background...

Share this post


Link to post
Share on other sites

Excellent idea Zapat - I'll try that tonight and post back with the results.

BTW - I found an old thread you posted about UI variables - posted slight modification to one of the solutions. :)

Share this post


Link to post
Share on other sites

Thanks guys, I had troubles getting the models to show on ArmA 3, even though I've done this in previous ArmA titles.

This helped me to get it working!

I have a new problem, though: I can't get the dialogs to display on the models' surfaces like it was done in the previous ArmA games (radio & GPS). I made a new thread about that here: http://forums.bistudio.com/showthread.php?177813-Dialog-controls-on-3D-object-surface

Let me know if you have a solution.

And thanks again!

Share this post


Link to post
Share on other sites

Are there any command/trick to Rotate the Model on the fly?

And is there a way to change the model on the fly?

Or must i made a entry for every object and hide/show them?

Because i work on a Custom Inventory and Shop menu. And with 3D Objects this would be even nicer. =D

For Rotate i don't find anything.

Like in DayZ Standalone or is this DayZSA Only? so Dean has added his own rotate command?

I love to work with GUI / made GUI. But i have totally no clue about dialog objects.

And Infos/help are very very rare :S

Share this post


Link to post
Share on other sites

^^ for rotate you gotta be reading these forums!

Solution already posted in another thread. Sorry, but you MUST either search or spend time reading threads.

Share this post


Link to post
Share on other sites

^^Yeah sry but the only thing i found was this:

You have to keep in mind that the model is rendered onto the GUI layer so it's not a world model. That's why it can not be rotated or moved with script commands - it's just a control container inside the dialog.

BUT i thought there must be anything/trick thats why i asked:

or is this DayZSA Only? so Dean has added his own rotate command?

Since often there was a man that found for something any tricks or something ect ect.

But anyway thats soo bad to see how nice features VBS2/3,Extended Engine DayZSA has. :S

I thought i can make a rly nice Inventory Replacement and a Nice looking shop but yeah.. hi my lovely old .paa pictures.

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  

×