typeOf: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| ofpr |Game name=
| ofpr |Game name=
Line 7: Line 6:


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation |GROUP1=
____________________________________________________________________________________________


| Returns the config class name of given object or "" if object does not have a config class. |DESCRIPTION=
| Returns the config class name of given object or "" if object does not have a config class. |DESCRIPTION=
____________________________________________________________________________________________


| [[typeOf]] object |SYNTAX=
| [[typeOf]] object |SYNTAX=
Line 17: Line 14:


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


| [[countType]], [[isKindOf]], [[configOf]] |SEEALSO=
| [[countType]], [[isKindOf]], [[configOf]] |SEEALSO=

Revision as of 05:14, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns the config class name of given object or "" if object does not have a config class.
Groups:
Object Manipulation

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 a AH-9 Pawnee"; };

Additional Information

See also:
countTypeisKindOfconfigOf

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