typeOf: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(object would be more accurate in this case)
m (template:command argument fix)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns the config class name of given object or "" if object doesn't have config class. |= Description
| Returns the config class name of given object or "" if object doesn't have config class. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


|'''typeOf''' object |= Syntax
|'''typeOf''' object |SYNTAX=


|p1= object: [[Object]] |= Parameter 1
|p1= object: [[Object]] |PARAMETER1=


| [[String]] |= Return value
| [[String]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[if]] ([[typeOf]] [[vehicle]] [[player]] == "B_Heli_Light_01_armed_F") [[then]] {[[hint]] "Player is in AH-9 Pawnee"};</code> |= Example 1
|x1= <code>[[if]] ([[typeOf]] [[vehicle]] [[player]] == "B_Heli_Light_01_armed_F") [[then]] {[[hint]] "Player is in AH-9 Pawnee"};</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[countType]], [[isKindOf]] |= See also
| [[countType]], [[isKindOf]] |SEEALSO=


}}
}}

Revision as of 15:50, 7 April 2019

Hover & click on the images for description

Description

Description:
Returns the config class name of given object or "" if object doesn't have config class.
Groups:
Uncategorised

Syntax

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

Examples

Example 1:
if (typeOf vehicle player == "B_Heli_Light_01_armed_F") then {hint "Player is in AH-9 Pawnee"};

Additional Information

See also:
countTypeisKindOf

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

Posted on August 4, 2006 - 12:03
hardrock
(CWR 1.90)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. (this method is no longer available since ArmA)

Bottom Section