Object: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Mention examples in introduction)
m (Text replacement - "{{Feature|Informative|" to "{{Feature|informative|")
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Object''' refers to a building block within a scenario. In general when using this term the author refers to the representation of an object (soldier, house, crate, etc) that can be manipulated when in the 3D environment via the scripting language. As there is a special representation that is used in the mission editor, one might distinguish between a 'game object' (this article) and an 'editor object' (see [[Editor Object]]).
'''Object''' refers to a building block within a scenario. In general when using this term the author refers to the representation of an object (soldier, house, crate, etc.) that can be manipulated when in the 3D environment via the scripting language. As there is a special representation that is used in the mission editor, one might distinguish between a 'game object' (this article) and an 'editor object' (see [[Editor Object]]).


==Object Type==
An Object in the scripting language is a generic reference for a soldier, vehicle or building. Such an object can be animated (a house, a tank), can have ai associated with it (a soldier), or, simply be a 'Rock'. Various commands in the scripting language can refer as equally to generic (eg Object) types, as much as specific subtypes.


_pos = GetPos player;
== Object Type ==
_pos = GetPos _MyHouse;


==Subtypes==
An Object in the scripting language is a generic reference for a soldier, vehicle or building. Such an object can be animated (a house, a tank), can have AI associated with it (a soldier), or, simply be a rock. Various commands in the scripting language can refer as equally to generic (e.g. Object) types, as much as specific sub-types.
<sqf>
_posAGL = getPos player;
_posATL = getPosATL _house;
</sqf>


Various 'subtypes' of an Object exist as poetic licence when describing the script command.


'''In General''' where a subtype is listed (rather than an 'Object' type) it means the command can/ should/ or is more normally associated with, that SUB type.
== Sub-types ==


===Vehicle===
In this wiki, when describing commands, various 'subtypes' of an object are distinguished. Although in general the commands accept parameters of type 'object', when a subtype is listed, the use of subtypes indicates that the command might not make sense or might not work on all objects.


A vehicle is an Object such as a Tank, car, Helicopter.
{| class="wikitable"
! Sub-type !! Description !! Only for
|-
| Vehicle || A vehicle is an object such as a tank, car, helicopter or jet. || -
|-
| ObjectRTD, HelicopterRTD || A helicopter using the [[Arma 3: Advanced Helicopter Flight Model|advanced flight model]]. || {{arma3}}, {{tkoh}}
|-
| Game Logic || If a game logic is created via scripting after mission start, then the logic will be local to the client that created it. A logic is an invisible object with no model. It has a namespace like every object and it has simulation like most objects. {{Feature|informative|In multiplayer, a game logic will always be local to the host computer, if it was placed in the mission editor. This works on both dedicated and player-hosted servers.}} || -
|-
| Person || A human || -
|-
| Animal || An animal such as dog and goat. || -
|-
| Rope || A rope is flexible and is connected to another object at one or both ends. See [[ropeCreate]] || {{arma3}}, {{tkoh}}
|-
| Unit || A unit is either a person or a vehicle. || -
|-
| Units || Units are an [[Array]] of type unit. || -
|-
| Unit(s) || Unit(s) refers to either an [[Array|array]] of type unit, a single unit or a [[Group]]. This distinction in the command reference refers to very different types, any of which could be used in the same command syntax. || -
|-
| Building || When used in the command reference, this object specifically refers to a non AI type model, such as a house, a rock or any other static object. || -
|-
| Container || A container can hold items such as weapons, magazines and uniforms.


===Person===
{| class="wikitable"
|-
! colspan="3" | Container
|-
! Sub-type !! Command usually contains !! Example
|-
| Vehicle with inventory || {{hl|cargo*}} || <sqf>clearWeaponCargo _truck;</sqf>
|-
| Backpack || {{hl|backpack*}}|| <sqf>clearAllItemsFromBackpack player;</sqf>
|-
| Vest || {{hl|vest*}}|| <sqf>vestContainer player;</sqf>
|-
| Uniform || {{hl|uniform*}} || <sqf>uniformContainer player;</sqf>
|-
| Scripted weapon holder || {{hl|cargo*}} || <sqf>backpackCargo _ammoBox;</sqf>
|-
| Ammo box, supply box || {{hl|cargo*}} || <sqf>backpackCargo _ammoBox;</sqf>
|}
| -
|}


A Person is a soldier, man, leader, player, woman.


===Unit===
A Unit is either a Person, or, Vehicle
===Units===
Units are an [[Array]] of type unit
===Unit(s)===
Unit(s) refer to EITHER an [[Array]] of type unit, or, a singular unit OR a [[Group]]. This distinction in the command reference refers to very different Types, any of which could be used in the same command syntax
_Unit DoWatch [[Position]]
[_unit1,_unit2,_unit3] DoWatch [[Position]]
_group1 allowFleeing 0.8
===Building===
When used in the command reference, this 'Object' specifically refers to a non AI type model, such as a house, or a rock.
[[Category: Data Types]]
[[Category: Data Types]]

Latest revision as of 00:24, 2 February 2024

Object refers to a building block within a scenario. In general when using this term the author refers to the representation of an object (soldier, house, crate, etc.) that can be manipulated when in the 3D environment via the scripting language. As there is a special representation that is used in the mission editor, one might distinguish between a 'game object' (this article) and an 'editor object' (see Editor Object).


Object Type

An Object in the scripting language is a generic reference for a soldier, vehicle or building. Such an object can be animated (a house, a tank), can have AI associated with it (a soldier), or, simply be a rock. Various commands in the scripting language can refer as equally to generic (e.g. Object) types, as much as specific sub-types.

_posAGL = getPos player; _posATL = getPosATL _house;


Sub-types

In this wiki, when describing commands, various 'subtypes' of an object are distinguished. Although in general the commands accept parameters of type 'object', when a subtype is listed, the use of subtypes indicates that the command might not make sense or might not work on all objects.

Sub-type Description Only for
Vehicle A vehicle is an object such as a tank, car, helicopter or jet. -
ObjectRTD, HelicopterRTD A helicopter using the advanced flight model. Arma 3, Take On Helicopters
Game Logic If a game logic is created via scripting after mission start, then the logic will be local to the client that created it. A logic is an invisible object with no model. It has a namespace like every object and it has simulation like most objects.
In multiplayer, a game logic will always be local to the host computer, if it was placed in the mission editor. This works on both dedicated and player-hosted servers.
-
Person A human -
Animal An animal such as dog and goat. -
Rope A rope is flexible and is connected to another object at one or both ends. See ropeCreate Arma 3, Take On Helicopters
Unit A unit is either a person or a vehicle. -
Units Units are an Array of type unit. -
Unit(s) Unit(s) refers to either an array of type unit, a single unit or a Group. This distinction in the command reference refers to very different types, any of which could be used in the same command syntax. -
Building When used in the command reference, this object specifically refers to a non AI type model, such as a house, a rock or any other static object. -
Container A container can hold items such as weapons, magazines and uniforms.
Container
Sub-type Command usually contains Example
Vehicle with inventory cargo*
Backpack backpack*
Vest vest*
Uniform uniform*
Scripted weapon holder cargo*
backpackCargo _ammoBox;
Ammo box, supply box cargo*
backpackCargo _ammoBox;
-