ZGreen-Spectre
Well-Known Member
Help and discussion for Spectre's Knockout/Revive starts here.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if (_uncon && _hasKnife) then {
if (_isAlive and !_isZombie and !_isAnimal and _unconscious and _hasKnife and _canDo and (player distance cursorTarget < 3)) then {
//Knocks an AI unit unconscious for 10 seconds - determines the correct animation to use, and returns unit to standing state after waking.
DZAI_unconscious = {
private ["_unit","_anim"];
_unit = _this select 0;
if ((animationState _unit) in ["amovppnemrunsnonwnondf","amovppnemstpsnonwnondnon","amovppnemstpsraswrfldnon","amovppnemsprslowwrfldf","aidlppnemstpsnonwnondnon0s","aidlppnemstpsnonwnondnon01"]) then {
_anim = "adthppnemstpsraswpstdnon_2";
} else {
_anim = "adthpercmstpslowwrfldnon_4";
};
_unit switchMove _anim;
_nul = [objNull, _unit, rSWITCHMOVE, _anim] call RE;
//diag_log "DEBUG :: AI unit is unconscious.";
sleep 10;
_nul = [objNull, _unit, rSWITCHMOVE, "amovppnemrunsnonwnondf"] call RE;
_unit switchMove "amovppnemrunsnonwnondf";
//diag_log "DEBUG :: AI unit is conscious.";
_unit setVariable ["unconscious",false];
};