mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added cpr start callback and function
This commit is contained in:
parent
c1238501d3
commit
477496e4f6
@ -252,7 +252,7 @@ class GVAR(Actions) {
|
||||
callbackSuccess = QFUNC(treatmentCPR);
|
||||
callbackFailure = "";
|
||||
callbackProgress = QUOTE(!([(_this select 0) select 1] call EFUNC(common,isAwake)));
|
||||
callbackStart = "";
|
||||
callbackStart = QFUNC(treatmentCPR_start);
|
||||
animationPatient = "";
|
||||
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
|
||||
animationCaller = "AinvPknlMstpSlayW[wpn]Dnon_medic";
|
||||
|
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Author: Zakant
|
||||
* Handels the start of the CPR treatment.
|
||||
*
|
||||
* Return Value:
|
||||
* NONE
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
params ["_caller", "_target", "_selectionName", "_className", "_items"];
|
||||
|
||||
_target setVariable [QGVAR(receiveCPR), true, true]; // Target receives CPR
|
||||
if(EGVAR(medical,CPRcreatesPulse)) then {
|
||||
_target setVariable [QEGVAR(medical,heartRate), round (30 + random [-5, 0, 5]) , true]; // And we have a (random) pulse
|
||||
};
|
||||
|
||||
_target setVariable [QEGVAR(medical,lastTimeUpdated), CBA_missionTime, true];
|
Loading…
Reference in New Issue
Block a user