CT_OBJECT

From Bohemia Interactive Community
Revision as of 18:52, 18 February 2024 by Lou Montana (talk | contribs) (Text replacement - "killzone_kid" to "Killzone_Kid")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Introduction

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/.

The y and z values for the vectorDir (direction array) and vectorUp (up) are switched.

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.

Related commands & functions

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with this config crawler.
#define CT_OBJECT 80


B

boneHead

Type
String
Description
n/a
boneHead = "head";


boneLEye

Type
String
Description
n/a
boneLEye = "l_eye";


boneLEyelidDown

Type
String
Description
n/a
boneLEyelidDown = "eye_lwl";


boneLEyelidUp

Type
String
Description
n/a
boneLEyelidUp = "eye_upl";


boneLPupil

Type
String
Description
n/a
boneLPupil = "l_pupila";


boneREye

Type
String
Description
n/a
boneREye = "r_eye";


boneREyelidDown

Type
String
Description
n/a
boneREyelidDown = "eye_lwr";


boneREyelidUp

Type
String
Description
n/a
boneREyelidUp = "eye_upr";


boneRPupil

Type
String
Description
n/a
boneRPupil = "r_pupila";


D

direction

Type
Array
Description
Equivalent of vectorDir with switched y and z values.
direction[] = {1,0,0};


E

enableZoom

Type
Number
Description
Toggle the ability to double click on the object to zoom in or out.
enableZoom = 1;


F

faceType

Type
String
Description
n/a
faceType = "Man_A3";


I

inBack

Type
Number, String
Description
Determines which set of coordinates to use.

Number example:

inBack = 0;

String example:

inBack = "False";


M

model

Type
String
Description
Path to the to be used p3d file.
model = "\A3\ui_f\objects\face_preview";


modelWoman

Type
String
Description
n/a
modelWoman = "\A3\ui_f\objects\face_preview";


P

position

Type
Array
Description
Position of the object relative to [0,0] on the screen.
position[] = {0,0,0.053};


S

scale

Type
Number
Description
Changes the size of the object.
scale = 0.35;


selectionArrow

Type
String
Description
Compass object only.
selectionArrow = "";


selectionDate1

Type
String
Description
Watch object only.
selectionDate1 = "";


selectionDate2

Type
String
Description
Watch object only.
selectionDate2 = "";


selectionEyelid

Type
String
Description
n/a
selectionEyelid = "eyelids";


selectionGlasses

Type
String
Description
n/a
selectionGlasses = "eyelids";


selectionLBrow

Type
String
Description
n/a
selectionLBrow = "lBrow";


selectionLip

Type
String
Description
n/a
selectionLip = "LLip";


selectionLMouth

Type
String
Description
n/a
selectionLMouth = "lMouth";


selectionMBrow

Type
String
Description
n/a
selectionMBrow = "mBrow";


selectionMMouth

Type
String
Description
n/a
selectionMMouth = "mMouth";


selectionPersonality

Type
String
Description
n/a
selectionPersonality = "personality";


selectionRBrow

Type
String
Description
n/a
selectionRBrow = "rBrow";


selectionRMouth

Type
String
Description
n/a
selectionRMouth = "rMouth";


U

up

Type
Array
Description
Equivalent to vectorUp command where y and z values are swapped.
up[] = {0,1,0};


W

waitForLoad

Type
Number
Description
n/a
waitForLoad = 0;


X

xBack

Type
Number
Description
x coordinate of the object with inBack = 1.
xBack = 0.6;


Y

yBack

Type
Number
Description
< coordinate of the object with inBack = 1.
yBack = 0.5;


Z

z

Type
Number
Description
z coordinate of the object with inBack = 0.
z = 0.2;


zBack

Type
Number
Description
z coordinate of the object with inBack = 1.
zBack = 0.1;


zoomDuration

Type
Number
Description
How long the zooming animation takes.
zoomDuration = 1;



Default Classes

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 keyword).

In older versions, use "Default" call BIS_fnc_exportGUIBaseClasses; and paste the result into the description.ext.

RscObject

class RscObject
{
	access = 0;
	type = CT_OBJECT;
	scale = 1;
	direction[] = {0,0,1};
	up[] = {0,1,0};
	shadow = 0;
};

Other examples

class MyWatch
{
	idd = -1;
	class objects
	{
		class Watch /* : RscObject */
		{
			access = 0;
			shadow = 0;
			idc = 101;
			type = 80;
			model = "\core\watch\watch.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;
			direction[] = { 0, 0, 1 };
			up[] = { 0, 1, 0 };
			zoomDuration = 1;
			scale = 0.7;
			waitForLoad = 0;
			class Animations
			{
				class WatchHour
				{
					type = "rotation";
					source = "clockHour";
					selection = "hodinova";
					axis = "osa";
					memory = 1;
					animPeriod = 0;
					angle0 = 0;
					angle1 = "rad 360";
				};
				class WatchMinute
				{
					type = "rotation";
					source = "clockMinute";
					selection = "minutova";
					axis = "osa";
					memory = 1;
					animPeriod = 0;
					angle0 = 0;
					angle1 = "rad 360";
				};
				class WatchSecond
				{
					type = "rotation";
					source = "clockSecond";
					selection = "vterinova";
					axis = "osa";
					memory = 1;
					animPeriod = 0;
					angle0 = 0;
					angle1 = "rad 360";
				};
			};
		};
	};
};