objectParent: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.49|= Game version ______________...") |
Killzone Kid (talk | contribs) (example) |
||
Line 22: | Line 22: | ||
</code>|= EXAMPLE1 | </code>|= EXAMPLE1 | ||
|x2= Create and place created backpack in front of player:<code>_backpackContainer = "B_TacticalPack_rgr" [[createVehicle]] [0,0,0]; | |||
_weaponHolder = [[objectParent]] _backpackContainer; | |||
_weaponHolder [[setPos]] ([[player]] [[modelToWorld]] [0,5,0]);</code>|= EXAMPLE2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 20:42, 7 August 2015
Description
- Description:
- Returns parent of an object if the object is proxy, otherwise objNull. In case of backpack, the parent is a weaponholder or a cargo space of a vehicle or the unit carrying it. Unit in a vehicle will return the vehicle as parent.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
_weaponholder = objectParent _mybackpack;
- Example 2:
- Create and place created backpack in front of player:
_backpackContainer = "B_TacticalPack_rgr" createVehicle [0,0,0]; _weaponHolder = objectParent _backpackContainer; _weaponHolder setPos (player modelToWorld [0,5,0]);
Additional Information
- See also:
- backpackContainerunitBackpackbackpackbackpackCargogetBackpackCargobackpackItemsaddBackpackaddBackpackCargoaddBackpackCargoGlobalremoveBackpackclearBackpackCargoclearBackpackCargoGlobalclearAllItemsFromBackpackloadBackpackbackpackSpaceForcanAddItemToBackpackaddItemToBackpackremoveItemFromBackpackeveryBackpack
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
[[Category:Introduced with arma3dev version 1.49]][[ Category: arma3dev: New Scripting Commands | OBJECTPARENT]][[ Category: arma3dev: Scripting Commands | OBJECTPARENT]]