Difference between revisions of "DCS func getDrawArgumentValue"
From DCS World Wiki - Hoggitworld.com
(Created page with "{{Template:dcs_funcs |fName= getDrawArgumentValue |vNum= 1.2.0 |par1= Unit |par2= Static Object |par3= |par4= |desc= Re...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
For example you can determine the rotation and orientation of the barrel of a Tanks cannon by checking its animation arguments. More practically you can determine whether or not a helicopters doors are open. | For example you can determine the rotation and orientation of the barrel of a Tanks cannon by checking its animation arguments. More practically you can determine whether or not a helicopters doors are open. | ||
+ | |||
+ | If draw argument value is invalid for the unit in question a value of 0 will be returned. | ||
|rtnType= number | |rtnType= number | ||
Line 26: | Line 28: | ||
|reqName1= Self | |reqName1= Self | ||
− | |reqType2= | + | |reqType2= number |
+ | |||
+ | |reqName2= arg | ||
− | | | + | |reqType3= |
|optType1= | |optType1= | ||
Line 34: | Line 38: | ||
|optType2= | |optType2= | ||
− | |examples= | + | |examples= When checking the Huey |
+ | |||
+ | local u = Unit.getByName('whoopwhoop') | ||
+ | if u:getDrawArgumentValue(43) == 1 then | ||
+ | -- left gunner door open | ||
+ | else | ||
+ | -- left gunner door closed | ||
+ | end | ||
+ | |||
|related= [[DCS_Class_Unit|'''Unit Functions:''']] {{listOfScriptingUnitFuncs}} | |related= [[DCS_Class_Unit|'''Unit Functions:''']] {{listOfScriptingUnitFuncs}} | ||
Line 44: | Line 56: | ||
}} | }} | ||
[[Category:Class Functions|getDrawArgumentValue]] | [[Category:Class Functions|getDrawArgumentValue]] | ||
+ | [[Category:Game Patch 1.2.0|getDrawArgumentValue]] |