object: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \[\[Category:Scripting Commands OFP 1.[4-9]{2}(\|(\{\{uc:\{\{PAGENAME\}\}\}\}|#|[A-Z0-9]+))?\]\]" to "")
m (formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofpr
|game1= ofp


|1.75
|version1= 1.75
 
|game2= ofpe
 
|version2= 1.00


|gr1= Object Detection
|gr1= Object Detection


| Return [[Object]] with given id. Object ID's can be checked in mission editor.<br><br>
|descr= Returns [[Object]] with given id. Object's id can be checked in mission editor.
 
{{Feature|arma3|Use [[nearestObject]] command family instead.}}
{{Feature|arma3|This command is not in Arma 3. Use [[nearestObject]] command family instead.}}


| [[Object]] <nowiki>=</nowiki> '''object''' id
|s1= '''object''' id


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


| [[Object]]
|r1= [[Object]]
   
   
|x1= <code>_obj <nowiki>=</nowiki> '''object''' 1 </code>
|x1= <code>_obj <nowiki>=</nowiki> '''object''' 1 </code>
Line 23: Line 26:


<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 22:10, 1 August 2006</dd>
<dd class="notedate">Posted on 22:10, 1 August 2006</dd>
<dt class="note">[[User:Hoz|Hoz]]<dd class="note">
<dt class="note">[[User:Hoz|Hoz]]<dd class="note">
(CWR 1.75)To check object ID's in the Mission Editor click on "Show IDs" and zoom in close. <br>
{{GVI|ofp|1.75}} To check object's id in the Mission Editor click on "Show IDs" and zoom in closely. <br>
(CWR 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. <br>
{{GVI|ofp|1.85}} You cannot {{ic|_object [[setPos]] [-10000, 0 ,0];}} terrain objects to get them out of the way, but you can use {{ic|_object [[setDamage]] 1;}} to get trees or other flora out of the way. <br>
(A1 1.08)This command is no longer available due to terrain data streaming, you need to use extended variant of [[nearestObject]] instead.
{{GVI|arma1|1.08}} This command is no longer available due to terrain data streaming, you need to use extended variant of [[nearestObject]] instead.
<!-- Note Section END -->
</dl>
</dl>

Revision as of 15:10, 27 March 2021

Hover & click on the images for description

Description

Description:
Returns Object with given id. Object's id can be checked in mission editor.
Arma 3
Use nearestObject command family instead.
Groups:
Object Detection

Syntax

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

Examples

Example 1:
_obj = object 1

Additional Information

See also:
nearestObjectsnearObjectsReadynearObjectsnearestObject

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
Posted on 22:10, 1 August 2006
Hoz
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.