{"name":"CT OBJECT","title":"CT OBJECT","type":"topic","url":"https://community.bistudio.com/wiki/CT_OBJECT","revid":373015,"updated":"2025-03-18T09:44:42Z","aliases":[],"markdown":"### Introduction\n\nWith this control type it is possible to integrate 3D objects into a dialog. For some more information you may want to look at this blog post by User:Killzone_Kid: http://killzonekid.com/arma-scripting-tutorials-gui-part-6/.\n\n> [!IMPORTANT]\n> The y and z values for the vectorDir (direction array) and vectorUp (up) are switched.\n>\n> The control position can be defined with either 'position' property, which is an array or separate 'x', 'y' and 'z' properties, which are floats. If both are used, the former overrides the latter.\n\n#### Related commands & functions\n\n- Commands: General\n- Commands: UI Eventhandlers\n- Commands: Object\n\n#### Related User Interface Eventhandlers\n\n- Events: General\n- onObjectMoved\n\n### Alphabetical Order\n\n> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> 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.\n\n```cpp\n#define CT_OBJECT 80\n```\n\n#### B\n\n##### boneHead\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneHead = \"head\";\n```\n\n##### boneLEye\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLEye = \"l_eye\";\n```\n\n##### boneLEyelidDown\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLEyelidDown = \"eye_lwl\";\n```\n\n##### boneLEyelidUp\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLEyelidUp = \"eye_upl\";\n```\n\n##### boneLPupil\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLPupil = \"l_pupila\";\n```\n\n##### boneREye\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneREye = \"r_eye\";\n```\n\n##### boneREyelidDown\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneREyelidDown = \"eye_lwr\";\n```\n\n##### boneREyelidUp\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneREyelidUp = \"eye_upr\";\n```\n\n##### boneRPupil\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneRPupil = \"r_pupila\";\n```\n\n#### D\n\n##### direction\n\n**Type:** Array\n\n**Description:** Equivalent of vectorDir with switched y and z values.\n\n```cpp\ndirection[] = {1,0,0};\n```\n\n#### E\n\n##### enableZoom\n\n**Type:** Number\n\n**Description:** Toggle the ability to double click on the object to zoom in or out.\n\n```cpp\nenableZoom = 1;\n```\n\n#### F\n\n##### faceType\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nfaceType = \"Man_A3\";\n```\n\n#### I\n\n##### inBack\n\n**Type:** Number, String\n\n**Description:** Determines which set of coordinates to use.\n\nNumber example:\n\n```cpp\ninBack = 0;\n```\n\nString example:\n\n```cpp\ninBack = \"False\";\n```\n\n#### M\n\n##### model\n\n**Type:** String\n\n**Description:** Path to the to be used p3d file.\n\n```cpp\nmodel = \"\\A3\\ui_f\\objects\\face_preview\";\n```\n\n##### modelWoman\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nmodelWoman = \"\\A3\\ui_f\\objects\\face_preview\";\n```\n\n##### minGlobalLightIntensity\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nminGlobalLightIntensity = 0.25;\n```\n\n#### P\n\n##### position\n\n**Type:** Array\n\n**Description:** Position of the object relative to [0,0] on the screen.\n\n```cpp\nposition[] = {0,0,0.053};\n```\n\n#### S\n\n##### scale\n\n**Type:** Number\n\n**Description:** Changes the size of the object.\n\n```cpp\nscale = 0.35;\n```\n\n##### selectionArrow\n\n**Type:** String\n\n**Description:** Compass object only.\n\n```cpp\nselectionArrow = \"\";\n```\n\n##### selectionDate1\n\n**Type:** String\n\n**Description:** Watch object only.\n\n```cpp\nselectionDate1 = \"\";\n```\n\n##### selectionDate2\n\n**Type:** String\n\n**Description:** Watch object only.\n\n```cpp\nselectionDate2 = \"\";\n```\n\n##### selectionEyelid\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionEyelid = \"eyelids\";\n```\n\n##### selectionGlasses\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionGlasses = \"eyelids\";\n```\n\n##### selectionLBrow\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionLBrow = \"lBrow\";\n```\n\n##### selectionLip\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionLip = \"LLip\";\n```\n\n##### selectionLMouth\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionLMouth = \"lMouth\";\n```\n\n##### selectionMBrow\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionMBrow = \"mBrow\";\n```\n\n##### selectionMMouth\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionMMouth = \"mMouth\";\n```\n\n##### selectionPersonality\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionPersonality = \"personality\";\n```\n\n##### selectionRBrow\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionRBrow = \"rBrow\";\n```\n\n##### selectionRMouth\n\n**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionRMouth = \"rMouth\";\n```\n\n#### U\n\n##### up\n\n**Type:** Array\n\n**Description:** Equivalent to vectorUp command where y and z values are swapped.\n\n```cpp\nup[] = {0,1,0};\n```\n\n##### useGlobalLight\n\n**Type:** Number\n\n**Description:** Enables Global Illumination on the Object.\n\n```cpp\nuseGlobalLight = 0;\n```\n\n#### W\n\n##### waitForLoad\n\n**Type:** Number\n\n**Description:** n/a\n\n```cpp\nwaitForLoad = 0;\n```\n\n#### X\n\n##### xBack\n\n**Type:** Number\n\n**Description:** x coordinate of the object with `inBack = 1`.\n\n```cpp\nxBack = 0.6;\n```\n\n#### Y\n\n##### yBack\n\n**Type:** Number\n\n**Description:** < coordinate of the object with `inBack = 1`.\n\n```cpp\nyBack = 0.5;\n```\n\n#### Z\n\n##### z\n\n**Type:** Number\n\n**Description:** z coordinate of the object with `inBack = 0`.\n\n```cpp\nz = 0.2;\n```\n\n##### zBack\n\n**Type:** Number\n\n**Description:** z coordinate of the object with `inBack = 1`.\n\n```cpp\nzBack = 0.1;\n```\n\n##### zoomDuration\n\n**Type:** Number\n\n**Description:** How long the zooming animation takes.\n\n```cpp\nzoomDuration = 1;\n```\n\n### Default Classes\n\n> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext.\n\n#### RscObject\n\n```cpp\nclass RscObject\n{\n    access = 0;\n    type = CT_OBJECT;\n    scale = 1;\n    direction[] = {0,0,1};\n    up[] = {0,1,0};\n    shadow = 0;\n};\n```\n\n### Other examples\n\n```cpp\nclass MyWatch\n{\n    idd = -1;\n    class objects\n    {\n        class Watch /* : RscObject */\n        {\n            access = 0;\n            shadow = 0;\n            idc = 101;\n            type = 80;\n            model = \"\\core\\watch\\watch.p3d\";\n            selectionDate1 = \"date1\";\n            selectionDate2 = \"date2\";\n            selectionDay = \"day\";\n            x = 0.7;\n            xBack = 0.7;\n            y = 0.12;\n            yBack = 0.12;\n            z = 0.22;\n            zBack = 0.22;\n            inBack = 0;\n            enableZoom = 0;\n            direction[] = { 0, 0, 1 };\n            up[] = { 0, 1, 0 };\n            zoomDuration = 1;\n            scale = 0.7;\n            waitForLoad = 0;\n            class Animations\n            {\n                class WatchHour\n                {\n                    type = \"rotation\";\n                    source = \"clockHour\";\n                    selection = \"hodinova\";\n                    axis = \"osa\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad 360\";\n                };\n                class WatchMinute\n                {\n                    type = \"rotation\";\n                    source = \"clockMinute\";\n                    selection = \"minutova\";\n                    axis = \"osa\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad 360\";\n                };\n                class WatchSecond\n                {\n                    type = \"rotation\";\n                    source = \"clockSecond\";\n                    selection = \"vterinova\";\n                    axis = \"osa\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad 360\";\n                };\n            };\n        };\n    };\n};\n```","sections":[{"heading":"Introduction","level":3,"markdown":"With this control type it is possible to integrate 3D objects into a dialog. For some more information you may want to look at this blog post by User:Killzone_Kid: http://killzonekid.com/arma-scripting-tutorials-gui-part-6/.\n\n> [!IMPORTANT]\n> The y and z values for the vectorDir (direction array) and vectorUp (up) are switched.\n>\n> The control position can be defined with either 'position' property, which is an array or separate 'x', 'y' and 'z' properties, which are floats. If both are used, the former overrides the latter."},{"heading":"Related commands & functions","level":4,"markdown":"- Commands: General\n- Commands: UI Eventhandlers\n- Commands: Object"},{"heading":"Related User Interface Eventhandlers","level":4,"markdown":"- Events: General\n- onObjectMoved"},{"heading":"Alphabetical Order","level":3,"markdown":"> [!NOTE]\n> TokenNames common to most controls, such as x, y, w, h, text, idc... can be found **here**.\n\n> [!WARNING]\n> 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.\n\n```cpp\n#define CT_OBJECT 80\n```"},{"heading":"B","level":4,"markdown":""},{"heading":"boneHead","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneHead = \"head\";\n```"},{"heading":"boneLEye","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLEye = \"l_eye\";\n```"},{"heading":"boneLEyelidDown","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLEyelidDown = \"eye_lwl\";\n```"},{"heading":"boneLEyelidUp","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLEyelidUp = \"eye_upl\";\n```"},{"heading":"boneLPupil","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneLPupil = \"l_pupila\";\n```"},{"heading":"boneREye","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneREye = \"r_eye\";\n```"},{"heading":"boneREyelidDown","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneREyelidDown = \"eye_lwr\";\n```"},{"heading":"boneREyelidUp","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneREyelidUp = \"eye_upr\";\n```"},{"heading":"boneRPupil","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nboneRPupil = \"r_pupila\";\n```"},{"heading":"D","level":4,"markdown":""},{"heading":"direction","level":5,"markdown":"**Type:** Array\n\n**Description:** Equivalent of vectorDir with switched y and z values.\n\n```cpp\ndirection[] = {1,0,0};\n```"},{"heading":"E","level":4,"markdown":""},{"heading":"enableZoom","level":5,"markdown":"**Type:** Number\n\n**Description:** Toggle the ability to double click on the object to zoom in or out.\n\n```cpp\nenableZoom = 1;\n```"},{"heading":"F","level":4,"markdown":""},{"heading":"faceType","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nfaceType = \"Man_A3\";\n```"},{"heading":"I","level":4,"markdown":""},{"heading":"inBack","level":5,"markdown":"**Type:** Number, String\n\n**Description:** Determines which set of coordinates to use.\n\nNumber example:\n\n```cpp\ninBack = 0;\n```\n\nString example:\n\n```cpp\ninBack = \"False\";\n```"},{"heading":"M","level":4,"markdown":""},{"heading":"model","level":5,"markdown":"**Type:** String\n\n**Description:** Path to the to be used p3d file.\n\n```cpp\nmodel = \"\\A3\\ui_f\\objects\\face_preview\";\n```"},{"heading":"modelWoman","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nmodelWoman = \"\\A3\\ui_f\\objects\\face_preview\";\n```"},{"heading":"minGlobalLightIntensity","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nminGlobalLightIntensity = 0.25;\n```"},{"heading":"P","level":4,"markdown":""},{"heading":"position","level":5,"markdown":"**Type:** Array\n\n**Description:** Position of the object relative to [0,0] on the screen.\n\n```cpp\nposition[] = {0,0,0.053};\n```"},{"heading":"S","level":4,"markdown":""},{"heading":"scale","level":5,"markdown":"**Type:** Number\n\n**Description:** Changes the size of the object.\n\n```cpp\nscale = 0.35;\n```"},{"heading":"selectionArrow","level":5,"markdown":"**Type:** String\n\n**Description:** Compass object only.\n\n```cpp\nselectionArrow = \"\";\n```"},{"heading":"selectionDate1","level":5,"markdown":"**Type:** String\n\n**Description:** Watch object only.\n\n```cpp\nselectionDate1 = \"\";\n```"},{"heading":"selectionDate2","level":5,"markdown":"**Type:** String\n\n**Description:** Watch object only.\n\n```cpp\nselectionDate2 = \"\";\n```"},{"heading":"selectionEyelid","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionEyelid = \"eyelids\";\n```"},{"heading":"selectionGlasses","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionGlasses = \"eyelids\";\n```"},{"heading":"selectionLBrow","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionLBrow = \"lBrow\";\n```"},{"heading":"selectionLip","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionLip = \"LLip\";\n```"},{"heading":"selectionLMouth","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionLMouth = \"lMouth\";\n```"},{"heading":"selectionMBrow","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionMBrow = \"mBrow\";\n```"},{"heading":"selectionMMouth","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionMMouth = \"mMouth\";\n```"},{"heading":"selectionPersonality","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionPersonality = \"personality\";\n```"},{"heading":"selectionRBrow","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionRBrow = \"rBrow\";\n```"},{"heading":"selectionRMouth","level":5,"markdown":"**Type:** String\n\n**Description:** n/a\n\n```cpp\nselectionRMouth = \"rMouth\";\n```"},{"heading":"U","level":4,"markdown":""},{"heading":"up","level":5,"markdown":"**Type:** Array\n\n**Description:** Equivalent to vectorUp command where y and z values are swapped.\n\n```cpp\nup[] = {0,1,0};\n```"},{"heading":"useGlobalLight","level":5,"markdown":"**Type:** Number\n\n**Description:** Enables Global Illumination on the Object.\n\n```cpp\nuseGlobalLight = 0;\n```"},{"heading":"W","level":4,"markdown":""},{"heading":"waitForLoad","level":5,"markdown":"**Type:** Number\n\n**Description:** n/a\n\n```cpp\nwaitForLoad = 0;\n```"},{"heading":"X","level":4,"markdown":""},{"heading":"xBack","level":5,"markdown":"**Type:** Number\n\n**Description:** x coordinate of the object with `inBack = 1`.\n\n```cpp\nxBack = 0.6;\n```"},{"heading":"Y","level":4,"markdown":""},{"heading":"yBack","level":5,"markdown":"**Type:** Number\n\n**Description:** < coordinate of the object with `inBack = 1`.\n\n```cpp\nyBack = 0.5;\n```"},{"heading":"Z","level":4,"markdown":""},{"heading":"z","level":5,"markdown":"**Type:** Number\n\n**Description:** z coordinate of the object with `inBack = 0`.\n\n```cpp\nz = 0.2;\n```"},{"heading":"zBack","level":5,"markdown":"**Type:** Number\n\n**Description:** z coordinate of the object with `inBack = 1`.\n\n```cpp\nzBack = 0.1;\n```"},{"heading":"zoomDuration","level":5,"markdown":"**Type:** Number\n\n**Description:** How long the zooming animation takes.\n\n```cpp\nzoomDuration = 1;\n```"},{"heading":"Default Classes","level":3,"markdown":"> [!NOTE]\n> **Arma 3:** **AddOns:** Classes need to be initialised first with `class SomeClass;`\n>\n> ---\n>\n> **Missions:** Since Arma 3 v2.02 one can use `import SomeClass;` to initialise a class (see the import keyword).\n>\n> In older versions, use `\"Default\" call BIS_fnc_exportGUIBaseClasses;` and paste the result into the description.ext."},{"heading":"RscObject","level":4,"markdown":"```cpp\nclass RscObject\n{\n    access = 0;\n    type = CT_OBJECT;\n    scale = 1;\n    direction[] = {0,0,1};\n    up[] = {0,1,0};\n    shadow = 0;\n};\n```"},{"heading":"Other examples","level":3,"markdown":"```cpp\nclass MyWatch\n{\n    idd = -1;\n    class objects\n    {\n        class Watch /* : RscObject */\n        {\n            access = 0;\n            shadow = 0;\n            idc = 101;\n            type = 80;\n            model = \"\\core\\watch\\watch.p3d\";\n            selectionDate1 = \"date1\";\n            selectionDate2 = \"date2\";\n            selectionDay = \"day\";\n            x = 0.7;\n            xBack = 0.7;\n            y = 0.12;\n            yBack = 0.12;\n            z = 0.22;\n            zBack = 0.22;\n            inBack = 0;\n            enableZoom = 0;\n            direction[] = { 0, 0, 1 };\n            up[] = { 0, 1, 0 };\n            zoomDuration = 1;\n            scale = 0.7;\n            waitForLoad = 0;\n            class Animations\n            {\n                class WatchHour\n                {\n                    type = \"rotation\";\n                    source = \"clockHour\";\n                    selection = \"hodinova\";\n                    axis = \"osa\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad 360\";\n                };\n                class WatchMinute\n                {\n                    type = \"rotation\";\n                    source = \"clockMinute\";\n                    selection = \"minutova\";\n                    axis = \"osa\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad 360\";\n                };\n                class WatchSecond\n                {\n                    type = \"rotation\";\n                    source = \"clockSecond\";\n                    selection = \"vterinova\";\n                    axis = \"osa\";\n                    memory = 1;\n                    animPeriod = 0;\n                    angle0 = 0;\n                    angle1 = \"rad 360\";\n                };\n            };\n        };\n    };\n};\n```"}],"categories":["Control Types"],"groups":["GUI"]}