typeOf: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
[[Category:Scripting Commands|TYPEOF]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|TYPEOF]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|TYPEOF]]
[[Category:Scripting Commands ArmA|TYPEOF]]


| ofp |= Game name


<h2 style="color:#000066">'''typeOf ''vehicle'''''</h2>
|1.00|= Game version
____________________________________________________________________________________________


| Returns the class type of a given object or vehicle. |= Description
____________________________________________________________________________________________


'''Operand types:'''
| '''typeOf''' vehicle |= Syntax


'''vehicle:''' [[Object]]
|p1= vehicle: [[Object]] |= Parameter 1


'''Type of returned value:'''
| [[String]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>_class = typeOf _mi24</pre> |= Example 1
____________________________________________________________________________________________


[[String]]
|  |= See also


'''Description:'''
}}


Returns the class type of a given object or vehicle.
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
</dl>


'''Example:'''
<h3 style="display:none">Bottom Section</h3>
Old Notes (temporary):


_class = '''typeOf''' _mi24
Try using this on an object pre-placed in the mission editor (such as a house): [[hint]] [[format]]["%1", typeof [[object]] xxx] Now place an object in the editor, save the map, and open up the [[mission.sqm]]. Find the line: vehicle="XXX", and replace XXX with the name of the object that you found above. Save it, and load the map.
 
[[Category:Scripting Commands|TYPEOF]]
 
[[Category:Scripting Commands OFP 1.96|TYPEOF]]
'''Comments:'''
[[Category:Scripting Commands OFP 1.46|TYPEOF]]
 
[[Category:Scripting Commands ArmA|TYPEOF]]
Try using this on an object pre-placed in the mission editor (such as a house):
 
[[hint]] [[format]]["%1", '''''typeof''''' [[object]] xxx]
 
Now place an object in the editor, save the map, and open up the [[Mission.sqm|mission.sqm]].
 
Find the line: '''vehicle="XXX"''', and replace '''XXX''' with the name of the object that you found above.
 
Save it, and load the map.

Revision as of 22:57, 1 August 2006

Hover & click on the images for description

Description

Description:
Returns the class type of a given object or vehicle.
Groups:
Uncategorised

Syntax

Syntax:
typeOf vehicle
Parameters:
vehicle: Object
Return Value:
String

Examples

Example 1:
_class = typeOf _mi24

Additional Information

See also:
See also needed

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

Notes

Bottom Section

Old Notes (temporary):

Try using this on an object pre-placed in the mission editor (such as a house): hint format["%1", typeof object xxx] Now place an object in the editor, save the map, and open up the mission.sqm. Find the line: vehicle="XXX", and replace XXX with the name of the object that you found above. Save it, and load the map.