setVehicleArmor: Difference between revisions

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


| arma1 |Game name=
| arma1 |Game name=
Line 12: Line 11:


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


| Sets the armor (or health for men) state of the vehicle (a value from 0 to 1).  
| Sets the armor (or health for men) state of the vehicle (a value from 0 to 1).  


Works like [[setDamage]] only in reverse: ''player setVehicleArmor 1'' is the same as ''player setDamage 0'', and ''player setVehicleArmor 0'' is the same as ''player setDamage 0.97''|DESCRIPTION=
Works like [[setDamage]] only in reverse: ''player setVehicleArmor 1'' is the same as ''player setDamage 0'', and ''player setVehicleArmor 0'' is the same as ''player setDamage 0.97''|DESCRIPTION=
____________________________________________________________________________________________


|  vehicleName '''setVehicleArmor''' value |SYNTAX=
|  vehicleName '''setVehicleArmor''' value |SYNTAX=
Line 26: Line 23:


| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=
____________________________________________________________________________________________
   
   
|x1= <code>[[player]] [[setVehicleArmor]] 0.5;</code> |EXAMPLE1=
|x1= <code>[[player]] [[setVehicleArmor]] 0.5;</code> |EXAMPLE1=
____________________________________________________________________________________________


| [[setDamage]] |SEEALSO=
| [[setDamage]] |SEEALSO=

Revision as of 04:57, 17 January 2021

Hover & click on the images for description

Description

Description:
Sets the armor (or health for men) state of the vehicle (a value from 0 to 1). Works like setDamage only in reverse: player setVehicleArmor 1 is the same as player setDamage 0, and player setVehicleArmor 0 is the same as player setDamage 0.97
Groups:
Object Manipulation

Syntax

Syntax:
vehicleName setVehicleArmor value
Parameters:
vehicleName: Object
value: Number range 0 to 1
Return Value:
Nothing

Examples

Example 1:
player setVehicleArmor 0.5;

Additional Information

See also:
setDamage

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

Bottom Section