forceHitPointsDamageSync: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{RV|type=command |game1= arma3 |version1=2.16 |branch= dev |arg= local |eff= global |gr1= Object Manipulation |descr= Synchronizes hitpoints valuse andtotal damage acros...")
 
No edit summary
Line 11: Line 11:
|gr1= Object Manipulation
|gr1= Object Manipulation


|descr= Synchronizes hitpoints valuse andtotal damage across current network clients as well as JIP. Possible uses after executing script commands such as [[setHit]], [[setHitIndex]], [[setHitPointDamage]] or in conjunction with HandleDamage event handler (see example 2)  
|descr= Synchronizes hitpoints valuse andtotal damage across current network clients as well as JIP. Possible uses after executing script commands such as [[setHit]], [[setHitIndex]], [[setHitPointDamage]] or in conjunction with HandleDamage event handler (see example 2). To sync static buildings, execute on the server.


|s1= [[forceHitPointsDamageSync]] entity
|s1= [[forceHitPointsDamageSync]] entity

Revision as of 17:31, 27 December 2023

Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.16.

Description

Description:
Synchronizes hitpoints valuse andtotal damage across current network clients as well as JIP. Possible uses after executing script commands such as setHit, setHitIndex, setHitPointDamage or in conjunction with HandleDamage event handler (see example 2). To sync static buildings, execute on the server.
Groups:
Object Manipulation

Syntax

Syntax:
forceHitPointsDamageSync entity
Parameters:
entity: Object - entity
Return Value:
Boolean - true if sync was attempted

Examples

Example 1:
forceHitPointsDamageSync house1;
Example 2:
house1 addEventHandler ["HandleDamage", { if (_this select 9 == 2) then {_this spawn {if (isServer) then {forceHitPointsDamageSync (_this select 0)}}}; if (_this select 7 find "glass" >= 0) then {_this select 2} else {0}; }];

Additional Information

See also:
getHit getHitPointDamage setHitPointDamage damage setDamage setFuel setAmmo getHitIndex setHitIndex

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