---
name: "CT OBJECT ZOOM"
type: topic
source: https://community.bistudio.com/wiki/CT_OBJECT_ZOOM
revid: 170128
updated: 2020-11-29T14:25:53Z
---

# CT OBJECT ZOOM

### Introduction

Very similar to [CT_OBJECT](../topics/CT_OBJECT.md). See that page for information on objects in dialogs.

#### Related commands & functions

- Commands: General
- Commands: UI Eventhandlers
- Commands: Object

#### Related User Interface Eventhandlers

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

### 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_ZOOM 81
```

#### A

##### AnimationSources

**Type:** Class

**Description:** n/a

```cpp
class AnimationSources
{
    class Threat_Level_Source
    {
        source = "user";
        initPhase = 0.005;
        animPeriod = 1;
    };
};
```

#### 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 = "\a3\Missions_F_Oldman\Systems\UI\Objects\WatchDummy.p3d";
```

#### P

##### position

**Type:** Array

**Description:** n/a

```cpp
position[] = {0,0,0.15};
```

##### positionBack

**Type:** Array

**Description:** n/a

```cpp
positionBack[] = {0.0475,-0.0575,0.225};
```

#### S

##### scale

**Type:** Number

**Description:** n/a

```cpp
scale = 2;
```

##### selectionDate1

**Type:** String

**Description:** n/a

```cpp
selectionDate1 = "date1";
```

##### selectionDate2

**Type:** String

**Description:** n/a

```cpp
selectionDate2 = "date2";
```

##### selectionDay

**Type:** String

**Description:** n/a

```cpp
selectionDay = "day";
```

#### U

##### up

**Type:** Array

**Description:** n/a

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

#### X

##### xBack

**Type:** String

**Description:** n/a

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

#### Y

##### yBack

**Type:** String

**Description:** n/a

```cpp
yBack = "13 * ((((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

#### RscExample

```cpp
class MyCompass
{
    idd = -1;
    class objects
    {
        class RscCompass /*: RscObject */
        {
            idc = -1;
            type = 81;
            scale = 1;
            shadow = 0;
            model = "\core\compass\compass.p3d";
            selectionArrow = "arrow";
            position[] = { 0.026, 0.047, 0.2 };
            direction[] = { 0, 1, 1 };
            up[] = { 0, 0, -1 };
            positionBack[] = { 0.0749, -0.059, 0.315 };
            inBack = 1;
            enableZoom = 0;
            zoomDuration = 0.5;
            class Animations
            {
                class Pointer
                {
                    type = "rotation";
                    source = "compassPointer";
                    selection = "kompas";
                    axis = "osa kompasu";
                    memory = 1;
                    animPeriod = 0;
                    minValue = "rad -180";
                    maxValue = "rad 180";
                    angle0 = "rad -180";
                    angle1 = "rad 180";
                };
                class Arrow
                {
                    type = "rotation";
                    source = "compassArrow";
                    selection = "arrow";
                    axis = "osa kompasu";
                    memory = 1;
                    animPeriod = 0;
                    minValue = "rad -180";
                    maxValue = "rad 180";
                    angle0 = "rad -180";
                    angle1 = "rad 180";
                };
                class Cover
                {
                    type = "rotation";
                    source = "compassCover";
                    selection = "vicko";
                    axis = "osa vicka";
                    memory = 1;
                    animPeriod = 0;
                    angle0 = 0;
                    angle1 = "rad -81";
                };
            };
        };
    };
};
```

<sub>Source: [BI Community Wiki — CT OBJECT ZOOM](https://community.bistudio.com/wiki/CT_OBJECT_ZOOM) (revision 170128).</sub>
