object: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (adjusted notes formating)
m (Some wiki formatting)
 
(45 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofpr |= Game name
|game1= ofp
|version1= 1.75


|1.75|= Game version
|game2= ofpe
____________________________________________________________________________________________
|version2= 1.00


| Return object with given id. Object ID's can be checked in mission editor. |= Description
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| '''object''' id |= Syntax
|gr1= Object Detection


|p1= id: [[Number]] |= Parameter 1
|descr= Returns [[Object]] with given id. Object's id can be checked in mission editor.
{{Feature|important|This command was removed as of {{arma1}} '''v1.08'''; for later versions and titles, use [[nearestObject]] command family instead.}}


| [[Object]] |= Return value
|s1= [[object]] id
____________________________________________________________________________________________
 
|x1= <code>_obj <nowiki>=</nowiki> '''object''' 1 </code> |= Example 1
____________________________________________________________________________________________


| |= See also
|p1= id: [[Number]]


}}
|r1= [[Object]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>_object = object 1;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
To check object ID's in the Mission Editor click on "Show IDs" and zoom in close.


Available in '''v1.75''' (Resistance) and above.
|seealso= [[nearestObjects]] [[nearObjectsReady]] [[nearObjects]] [[nearestObject]]
}}


Since version '''1.85''', you can't [[setPos]] island objects to get them out of the way, but you can use [[setDamage]] 1 to get trees or other flora out of the way.  
{{Note
 
|user= Hoz
Since [[Armed Assault]] this command is no longer available due to terrain data streaming, you need to use extended variant of [[nearestObject]] instead.
|timestamp= 20060801221000
<!-- Note Section END -->
|text=
</dl>
{{GVI|ofp|1.75}} To check object's id in the Mission Editor click on "Show IDs" and zoom in closely.<br>
 
{{GVI|ofp|1.85}} You cannot <sqf inline>_object setPos [-10000, 0 ,0];</sqf> terrain objects to get them out of the way, but you can use <sqf inline>_object setDamage 1;</sqf> to get trees or other flora out of the way.<br>
<h3 style="display:none">Bottom Section</h3>
{{GVI|arma1|1.08}} This command is no longer available due to terrain data streaming, you need to use extended variant of [[nearestObject]] instead.
 
}}
[[Category:Scripting Commands|OBJECT]]
[[Category:Scripting Commands OFP 1.96|OBJECT]]

Latest revision as of 15:17, 1 July 2022

Hover & click on the images for description

Description

Description:
Returns Object with given id. Object's id can be checked in mission editor.
This command was removed as of Armed Assault v1.08; for later versions and titles, use nearestObject command family instead.
Groups:
Object Detection

Syntax

Syntax:
object id
Parameters:
id: Number
Return Value:
Object

Examples

Example 1:
_object = object 1;

Additional Information

See also:
nearestObjects nearObjectsReady nearObjects nearestObject

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
Hoz - c
Posted on Aug 01, 2006 - 22:10 (UTC)
Logo A0.png1.75 To check object's id in the Mission Editor click on "Show IDs" and zoom in closely.
Logo A0.png1.85 You cannot _object setPos [-10000, 0 ,0]; terrain objects to get them out of the way, but you can use _object setDamage 1; to get trees or other flora out of the way.
Logo A1 black.png1.08 This command is no longer available due to terrain data streaming, you need to use extended variant of nearestObject instead.