typeOf: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dt class="note">'''\[\[.*\]\]'''" to "<dt class="note">$1")
m (Fix username deletion mistake)
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 does not have a config class. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


|'''typeOf''' object |SYNTAX=
| [[typeOf]] object |SYNTAX=


|p1= object: [[Object]] |PARAMETER1=
|p1= object: [[Object]] |PARAMETER1=
Line 17: Line 17:
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[if]] ([[typeOf]] [[vehicle]] [[player]] == "B_Heli_Light_01_armed_F") [[then]] {[[hint]] "Player is in 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]] |SEEALSO=
| [[countType]], [[isKindOf]] |SEEALSO=
}}
}}


Line 28: Line 27:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on August 4, 2006 - 12:03
<dd class="notedate">Posted on August 4, 2006 - 12:03
<dt class="note">[[]]<dd class="note">(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)
<dt class="note">[[User:Hardrock|hardrock]]
<dd class="note">(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)
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands OFP 1.46|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|TYPEOF]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|TYPEOF]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.46|TYPEOF]]
[[Category:Scripting Commands ArmA|TYPEOF]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Object Information|{{uc:{{PAGENAME}}}}]]

Revision as of 18:46, 19 May 2020

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:
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 a 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