Medical Core Functions

ace_medical_fnc_addDamageToUnit

Description

Manually Apply Damage to a unit (can cause lethal damage)

Parameters

Index Description Datatype(s) Default Value
0 The Unit OBJECT  
1 Damage to Add NUMBER  
2 Body part (“Head”, “Body”, “LeftArm”, “RightArm”, “LeftLeg”, “RightLeg”) STRING  
3 Projectile Type STRING  
4 Source OBJECT  
5 Unused parameter maintained for backwards compatibility ARRAY []
6 Override Invulnerability BOOL true

Return Value

Description Datatype(s)
Successful BOOL

Example

[player, 0.8, "rightleg", "bullet"] call ace_medical_fnc_addDamageToUnit
[cursorTarget, 1, "body", "stab", player] call ace_medical_fnc_addDamageToUnit

Authors

  • PabstMirror

ace_medical_fnc_deserializeState

Description

Deserializes the medical state of a unit and applies it.

Parameters

Index Description Datatype(s) Default Value
0 Unit OBJECT  
1 State as JSON STRING  

Return Value

None

Example

[player, _json] call ace_medical_fnc_deserializeState

Authors

  • BaerMitUmlaut

ace_medical_fnc_adjustPainLevel

Description

Public interface to allow external modules to safely adjust pain levels. Added pain can be positive or negative (Note: ignores painCoefficient setting)

Parameters

Index Description Datatype(s) Default Value
0 The patient OBJECT  
1 Added ammount of pain (can be negative) NUMBER  

Return Value

Description Datatype(s)
The new pain level NUMBER

Example

[guy, 0.5] call ace_medical_fnc_adjustPainLevel

Authors

  • PabstMirror

ace_medical_fnc_setUnconscious

Description

Sets a unit in the unconscious state.

Parameters

Index Description Datatype(s) Default Value
0 The unit that will be put in an unconscious state OBJECT  
1 Set unconsciouns BOOL true
2 Minimum unconscious time (set to 0 to ignore) OPTIONAL 0
3 Force wakeup at given time if vitals are stable OPTIONAL false

Return Value

Description Datatype(s)
Success? BOOLEAN

Example

[bob, true] call ace_medical_fnc_setUnconscious;
[player, true, 5, true] call ace_medical_fnc_setUnconscious;

Authors

  • Glowbal

ace_medical_fnc_serializeState

Description

Serializes the medical state of a unit into a string.

Parameters

Index Description Datatype(s) Default Value
0 Unit OBJECT  

Return Value

Description Datatype(s)
Serialized state as JSON string STRING

Example

[player] call ace_medical_fnc_serializeState

Authors

  • BaerMitUmlaut