---
name: "CT OBJECT CONTAINER"
type: topic
source: https://community.bistudio.com/wiki/CT_OBJECT_CONTAINER
revid: 364508
updated: 2024-05-16T20:42:02Z
---

# CT OBJECT CONTAINER

### Introduction

See [CT_OBJECT](../topics/CT_OBJECT.md) for more information on the basics of object dialogs. In addition to [CT_OBJECT](../topics/CT_OBJECT.md) this control type supports the addition of controls inside of a predefined area of the object which means that if the object moves so do the controls inside of it.

> [!NOTE]
> For an object with selections one can use user texture. For example `"\A3\Misc_F\Helpers\UserTexture1m.p3d"` has selections: `usertexture`, `usertexture TL`,`usertexture TR`, `usertexture BL`.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers

#### Related User Interface Eventhandlers

- [Events: General](../topics/User_Interface_Event_Handlers.md#generic-events)

### Alphabetical Order

> [!NOTE]
> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [**here**](../topics/Arma~3A_GUI_Configuration.md#common-properties).

> [!WARNING]
> Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with [this](https://github.com/7erra/BIKI.VR/blob/master/fnc/generateCTPage.sqf) config crawler.

```cpp
#define CT_OBJECT_CONTAINER 82
```

#### A

##### Areas

**Type:** Class

**Description:** n/a

```cpp
class Areas
{
    class Usertexture
    {
        selection = "display";
        class Controls
        {
        };
    };
};
```

#### D

##### direction

**Type:** Array

**Description:** n/a

```cpp
direction[] = {0,0,1};
```

#### E

##### enableZoom

**Type:** Number

**Description:** n/a

```cpp
enableZoom = 1;
```

#### I

##### inBack

**Type:** Number

**Description:** n/a

```cpp
inBack = 0;
```

#### M

##### model

**Type:** String

**Description:** n/a

```cpp
model = "\core\notepad\notepad.p3d";
```

#### P

##### paper1

**Type:** String

**Description:** n/a

```cpp
paper1 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### paper2

**Type:** String

**Description:** n/a

```cpp
paper2 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### paper3

**Type:** String

**Description:** n/a

```cpp
paper3 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### paper4

**Type:** String

**Description:** n/a

```cpp
paper4 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### paper5

**Type:** String

**Description:** n/a

```cpp
paper5 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### paper6

**Type:** String

**Description:** n/a

```cpp
paper6 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### paper7

**Type:** String

**Description:** n/a

```cpp
paper7 = "#(argb,8,8,3)color(1,1,1,1)";
```

##### position

**Type:** Array

**Description:** n/a

```cpp
position[] = {-0.08,0,0.32};
```

##### positionBack

**Type:** Array

**Description:** n/a

```cpp
positionBack[] = {-0.325,0.197,0.8};
```

#### S

##### scale

**Type:** Number

**Description:** n/a

```cpp
scale = 1.2;
```

##### selectionPaper

**Type:** String

**Description:** n/a

```cpp
selectionPaper = "paper";
```

#### U

##### up

**Type:** Array

**Description:** n/a

```cpp
up[] = {0,1,0};
```

#### X

##### xBack

**Type:** String

**Description:** n/a

```cpp
xBack = "25 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
```

#### Y

##### yBack

**Type:** String

**Description:** n/a

```cpp
yBack = "12 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
```

#### Z

##### z

**Type:** Number

**Description:** n/a

```cpp
z = 1;
```

##### zBack

**Type:** Number

**Description:** n/a

```cpp
zBack = 2;
```

##### zoomDuration

**Type:** Number

**Description:** n/a

```cpp
zoomDuration = 0.5;
```

### Default Classes

> [!NOTE]
> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`
>
> ---
>
> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the [import](../topics/import_~28Config~29.md) keyword).
>
> In older versions, use `"Default" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the [description.ext](../topics/Description.ext.md).

None

### Other Examples

```cpp
class MyDrink
{

    idd = -1;
    movingEnable = 0;
    enableSimulation = 1;

    class Objects
    {

        class Can
        {

            onObjectMoved = "systemChat str _this";

            idc = -1;
            type = 82;
            model = "\A3\Structures_F\Items\Food\Can_V3_F.p3d";
            scale = 1;

            direction[] = {0, -0.35, -0.65};
            up[] = {0, 0.65, -0.35};

            //position[] = {0,0,0.2}; optional

            x = 0.5;
            y = 0.5;
            z = 0.2;

            //positionBack[] = {0,0,1.2}; optional

            xBack = 0.5;
            yBack = 0.5;
            zBack = 1.2;

            inBack = 1;
            enableZoom = 1;
            zoomDuration = 0.001;
            class Areas
            {
                class Something1
                {
                    selection = "Area_1";
                    // game will expect "Area_1 TL", "Area_1 TR", "Area_1 BL" memory points (Top Left, Top Right, Bottom Left) to be present in memory LOD. Basing on that surface will be created for rendering your controls

                    // Only controls are supported (no object in object)
                    class Controls
                    {
                    };
                };
                // Multiple areas are supported
                class Something2
                {
                    selection = "Area_2";
                    // game will expect "Area_2 TL", "Area_2 TR", "Area_2 BL" memory points (Top Left, Top Right, Bottom Left) to be present in memory LOD. Basing on that surface will be created for rendering your controls
                    class Controls
                    {
                    };
                };
            };
        };
    };
};
```

<sub>Source: [BI Community Wiki — CT OBJECT CONTAINER](https://community.bistudio.com/wiki/CT_OBJECT_CONTAINER) (revision 364508).</sub>
