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_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_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_fullHeal
Description
Fully heals the patient.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Patient | OBJECT | |
1 | Medic | OBJECT | objNull |
2 | Write message to patient log | BOOL | false |
Return Value
None
Example
player call ace_medical_fnc_fullHeal
Authors
- DartRuffian
ace_medical_fnc_getBandagedWounds
Description
Returns a copy of unit’s bandaged wounds on a body part.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT | |
1 | Body Part | STRING |
Return Value
Description | Datatype(s) |
---|---|
Wounds | ARRAY of ARRAY |
Example
[player, "head"] call ace_medical_fnc_getBandagedWounds
Authors
- LinkIsGrim
ace_medical_fnc_getBloodLoss
Description
Calculate the total blood loss of a unit.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT |
Return Value
Description | Datatype(s) |
---|---|
Total blood loss of unit (litres/second) | NUMBER |
Example
player call ace_medical_fnc_getBloodLoss
Authors
- DartRuffian
ace_medical_fnc_getIVs
Description
Returns a copy of unit’s IVs.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT |
Return Value
Description | Datatype(s) |
---|---|
IVs | ARRAY of ARRAY |
Example
player call ace_medical_fnc_getIVs
Authors
- LinkIsGrim
ace_medical_fnc_getOpenWounds
Description
Returns a copy of unit’s open wounds on a body part.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT | |
1 | Body Part | STRING |
Return Value
Description | Datatype(s) |
---|---|
Wounds | ARRAY of ARRAY |
Example
[player, "head"] call ace_medical_fnc_getOpenWounds
Authors
- LinkIsGrim
ace_medical_fnc_getStitchedWounds
Description
Returns a copy of unit’s stitched wounds on a body part.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT | |
1 | Body Part | STRING |
Return Value
Description | Datatype(s) |
---|---|
Wounds | ARRAY of ARRAY |
Example
[player, "head"] call ace_medical_fnc_getStitchedWounds
Authors
- LinkIsGrim
ace_medical_fnc_isInjured
Description
Checks if a unit is injured (bleeding, fractured limbs, low blood, etc). Unit may still require further treatment even if false.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT |
Return Value
Description | Datatype(s) |
---|---|
Is unit injured | BOOL |
Example
player call ace_medical_fnc_isInjured
Authors
- DartRuffian
ace_medical_fnc_isInStableCondition
Description
Checks if a unit is in stable condition (stable vitals, awake, and not bleeding). Unit shouldn’t require further treatment if true and not injured.
Parameters
Index | Description | Datatype(s) | Default Value |
---|---|---|---|
0 | Unit | OBJECT |
Return Value
Description | Datatype(s) |
---|---|
Is unit stable | BOOL |
Example
player call ace_medical_fnc_isInStableCondition
Authors
- DartRuffian
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
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