allowDamage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dd class="notedate">Posted on ([^<>]+) " to "<dd class="notedate">Posted on $1</dd> ")
m (Text replacement - "\{\{( *)Important( *)\|" to "{{$1Feature$2|$2important$2|")
Line 13: Line 13:
| Allow or prevent an object being damaged (or injured, or killed). The command does not prevent object from taking scripted damage such as [[setHit]], [[setHitIndex]], [[setHitPointDamage]] or [[setDamage]]. To check if damage is allowed at current locality, see [[isDamageAllowed]].<br>
| Allow or prevent an object being damaged (or injured, or killed). The command does not prevent object from taking scripted damage such as [[setHit]], [[setHitIndex]], [[setHitPointDamage]] or [[setDamage]]. To check if damage is allowed at current locality, see [[isDamageAllowed]].<br>


{{Important | This command has to be executed where object is [[local]] and as long as object does not change locality the effect of this command will be global. If object changes locality, the command needs to be executed again on the new [[owner]]'s machine to maintain the effect}}
{{Feature | important | This command has to be executed where object is [[local]] and as long as object does not change locality the effect of this command will be global. If object changes locality, the command needs to be executed again on the new [[owner]]'s machine to maintain the effect}}


| object [[allowDamage]] allow
| object [[allowDamage]] allow

Revision as of 03:07, 7 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Object Manipulation

Syntax

Syntax:
Syntax needed
Parameters:
object: Object
allow: Boolean
Return Value:
Return value needed

Examples

Example 1:
player allowDamage false;

Additional Information

See also:
See also needed

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
Posted on September 2, 2013
AgentRev
_object allowDamage false; has the same effect as _object addEventHandler ["HandleDamage", {0}]; except for buildings that are native to the map; for those, the effects of HandleDamage will not sync properly across all clients, even if added to the building on every client and the server