Jump to content

Recommended Posts

Hello all,

I am creating a 3D object that involves a laptop. Similar to @killzone_kid 's example. I have got the laptop setup just fine but I am looking for information on "class Areas"(assuming this is what I need) but can't find anything useful on the Wiki. Seems to be lacking valuable information or maybe I am just blind heh.

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

What I am trying to do is add things inside the laptop screen. Normal UI elements like RscText, RscPicture, etc...

Here is what I have so far (very basic):

dSczMGv.jpg

class dlg_laptop
{
	idd = 12345;
	movingEnable = 0;
	onLoad = "uiNamespace setVariable [""disp_laptop"", param [0]];";
	onUnload = "uiNamespace setVariable [""disp_laptop"", nil];";
	class objects
	{
		class laptop
		{
			idc = 100;
			type = CT_OBJECT_CONTAINER;
			x = 0.25 * safezoneW + safezoneX;
			y = 0.16 * safezoneH + safezoneY;
			w = 0.5 * safezoneW;
			h = 0.68 * safezoneH;
			z = 0.2;
			xBack = 0.5;
			yBack = 0.5;
			zBack = 1.2;
			inBack = 9;
			scale = 3;
			direction[] = {0, -0.35, -0.65};
			up[] = {0, 0.65, -0.35};
			enableZoom = 1;
			zoomDuration = 0.001;
			model = "\A3\Structures_F\Items\Electronics\Laptop_unfolded_F.p3d";
		};
	};
};

Any help would be great. Thanks!

  • Like 1

Share this post


Link to post
Share on other sites
class Areas
{
    selection = "nameOfSelection";
    class controls
    {
        [your controls insidie"]
    };
};

nameOfSelection is sort of mask - game will be looking in memory LOD for following memory points

"nameOfSelection" + " TL" (therfore you need "nameOfSelection  TL" memory point. TL = Top Left. Note space!)

"nameOfSelection" + " TR" (therfore you need "nameOfSelection  TR" memory point. TR = Top Right. Note space!)

"nameOfSelection" + " BL" (therfore you need "nameOfSelection  BL" memory point. BL = Bottom Left. Note space!)

creation of surface for rendering controls is similar to class MFD topLeft/Right/BottomLeft https://community.bistudio.com/wiki?title=A3_MFD_config_reference#Global_HUD_Properties

 

I don't think there is a way to use camo selections for it so I guess KK created/used some fake object on top of laptop screen. You can notice table, can & laptop are part of UI because of missing shading so adding another object (fake surface) is quite likely. It could be also modified laptop but only KK knows it I guess.

  • Like 1

Share this post


Link to post
Share on other sites

@reyhard - Thanks for the info!

How would I define multiple selections? Say like:

"a" + " TL"
"b" + " TR"
// etc

Since you have the "selection = " before the class controls.

Share this post


Link to post
Share on other sites

game is expecting those selections in memory LOD of object

Share this post


Link to post
Share on other sites
On 7/29/2018 at 8:19 AM, HazJ said:

@reyhard - Thanks for the info!

How would I define multiple selections? Say like:


"a" + " TL"
"b" + " TR"
// etc

Since you have the "selection = " before the class controls.

 

Did you managed to get it to work?

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

×