isDamageAllowed: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Introduced in game=
| arma3 |Introduced in game=
Line 9: Line 9:
|eff= local |MPEFFECTS=  
|eff= local |MPEFFECTS=  


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


| A getter for [[allowDamage]] command. The command indicates if damage is allowed at current [[local]]ity, hence local effect of the command. For complete solution for being able to tell whether or not an object can be damaged at current locality see '''Example 1'''.|DESCRIPTION=
| A getter for [[allowDamage]] command. The command indicates if damage is allowed at current [[local]]ity, hence local effect of the command. For complete solution for being able to tell whether or not an object can be damaged at current locality see '''Example 1'''.


| [[isDamageAllowed]] object |SYNTAX=
| [[isDamageAllowed]] object


|p1= object: [[Object]] |PARAMETER1=
|p1= object: [[Object]]


| [[Boolean]] |RETURNVALUE=
| [[Boolean]]


|x1= <code>[[private]] _canBeDamaged = [[local]] _obj && [[isDamageAllowed]] _obj;</code> |EXAMPLE1=
|x1= <code>[[private]] _canBeDamaged = [[local]] _obj && [[isDamageAllowed]] _obj;</code>


| [[allowDamage]], [[setDamage]], [[setHit]] |SEEALSO=
| [[allowDamage]], [[setDamage]], [[setHit]]


|mp= This command only works locally. It always returns false when called on non local objects |MPBEHAVIOUR=  
|mp= This command only works locally. It always returns false when called on non local objects |MPBEHAVIOUR=  

Revision as of 00:41, 18 January 2021

Hover & click on the images for description

Description

Description:
A getter for allowDamage command. The command indicates if damage is allowed at current locality, hence local effect of the command. For complete solution for being able to tell whether or not an object can be damaged at current locality see Example 1.
Multiplayer:
This command only works locally. It always returns false when called on non local objects
Groups:
Object Manipulation

Syntax

Syntax:
isDamageAllowed object
Parameters:
object: Object
Return Value:
Boolean

Examples

Example 1:
private _canBeDamaged = local _obj && isDamageAllowed _obj;

Additional Information

See also:
allowDamagesetDamagesetHit

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