typeOf: Difference between revisions
Jump to navigation
Jump to search
m (moved notes) |
m (template:command argument fix) |
||
(23 intermediate revisions by 11 users not shown) | |||
Line 2: | Line 2: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | ofpr |= Game name | ||
|1. | |1.90|= Game version | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Returns the class | | Returns the config class name of given object or "" if object doesn't have config class. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| '''typeOf''' | |'''typeOf''' object |SYNTAX= | ||
|p1= | |p1= object: [[Object]] |PARAMETER1= | ||
| [[String]] |= | | [[String]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= < | |x1= <code>[[if]] ([[typeOf]] [[vehicle]] [[player]] == "B_Heli_Light_01_armed_F") [[then]] {[[hint]] "Player is in AH-9 Pawnee"};</code> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[countType]], [[isKindOf]] |SEEALSO= | ||
}} | }} | ||
Line 27: | Line 27: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on August 4, 2006 - 12:03 | |||
Try using this on an object pre-placed in the mission editor (such as a house): [[hint]] [[format]]["%1", | <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> | ||
Line 36: | Line 36: | ||
[[Category:Scripting Commands|TYPEOF]] | [[Category:Scripting Commands|TYPEOF]] | ||
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.96|TYPEOF]] | [[Category:Scripting Commands OFP 1.96|TYPEOF]] | ||
[[Category:Scripting Commands OFP 1.46|TYPEOF]] | [[Category:Scripting Commands OFP 1.46|TYPEOF]] | ||
[[Category:Scripting Commands ArmA|TYPEOF]] | [[Category:Scripting Commands ArmA|TYPEOF]] | ||
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] |
Revision as of 15:50, 7 April 2019
Description
- Description:
- Returns the config class name of given object or "" if object doesn't have config class.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
if (typeOf vehicle player == "B_Heli_Light_01_armed_F") then {hint "Player is in AH-9 Pawnee"};
Additional Information
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
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Resistance version 1.90
- Operation Flashpoint: Resistance: New Scripting Commands
- Operation Flashpoint: Resistance: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Command Group: Object Information
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters