Object: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Informative( *)\|" to "{{$1Feature$2|$2Informative$2|") |
m (added container as sub type) |
||
Line 44: | Line 44: | ||
; Building | ; Building | ||
: When used in the command reference, this 'Object' specifically refers to a non AI type model, such as a house, or a rock. | : When used in the command reference, this 'Object' specifically refers to a non AI type model, such as a house, or a rock. | ||
; Container | |||
{| class="wikitable" | |||
|- | |||
! colspan="3" |Container | |||
|- | |||
! Subtype !! Command usually contains !! Example | |||
|- | |||
| Vehicle with inventory || <tt>cargo*</tt> || <code>[[clearWeaponCargo]] _truck;</code> | |||
|- | |||
| Backpack || <tt>backpack*</tt>|| <code>[[clearAllItemsFromBackpack]] [[player]];</code> | |||
|- | |||
| Vest || <tt>vest*</tt>|| <code>[[vestContainer]] [[player]];</code> | |||
|- | |||
| Uniform || <tt>uniform*</tt> || <code>[[uniformContainer]] [[player]];</code> | |||
|- | |||
| Scripted weapon holder || <tt>cargo*</tt> || <code>[[backpackCargo]] _ammoBox;</code> | |||
|- | |||
| Ammo box, supply box || <tt>cargo*</tt> || <code>[[backpackCargo]] _ammoBox;</code> | |||
|} | |||
[[Category: Data Types]] | [[Category: Data Types]] |
Revision as of 09:06, 20 May 2021
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; _pos = getPos _house;
Subtypes
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.
- Vehicle
- A vehicle is an Object such as a Tank, car, Helicopter.
- ObjectRTD Helicopter
- A helicopter using the advanced flight model.
- 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.
- Person
- A Person is a soldier, man, leader, player, woman.
- Rope
- A Rope is flexible and is connected to another object at one or both ends.
- 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 allowFleeing0.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.
- Container
Container | ||
---|---|---|
Subtype | Command usually contains | Example |
Vehicle with inventory | cargo* | clearWeaponCargo _truck;
|
Backpack | backpack* | clearAllItemsFromBackpack player;
|
Vest | vest* | vestContainer player;
|
Uniform | uniform* | uniformContainer player;
|
Scripted weapon holder | cargo* | backpackCargo _ammoBox;
|
Ammo box, supply box | cargo* | backpackCargo _ammoBox;
|