Page MenuHomeFeedback Tracker

setUnconscious animation
New, NormalPublic

Description

_Ai setUnconscious true; command will not show Unconscious animation on server, dedicated.Is it a bug or i have to do something?

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

init.sqf

fnc_injured = { 
	_unit = _this select 0;
    _unit removeAllMPEventHandlers "MPHit";
	_unit setUnconscious true;
//  	[_unit] remoteExec ["setUnconscious", 2]; 
while {(true)} do {

sleep (30 + random 60);

_ls = lifeState _unit;

if (_ls != "INCAPACITATED") exitWith {};
	
_sound = [
"pain1", "pain2", "pain3", "pain4", "pain5", "pain6", "pain7", "pain8", "pain9", "pain10", "pain11", "pain12", "pain13"
] call BIS_fnc_selectRandom;

_unit say3D [_sound, 100, 1];

sleep (60 + random 60);
	
};
	};

initserver.sqf

{
	if (side _x == east) then {
		
		 if (_x isKindOf "Man") then
            {
				_x removeAllMPEventHandlers "MPHit";
				
		call compile format["
			%1 addMPEventHandler ['MPHit',{
				if (vehicle %1 == %1) then {
					_rand = random 100;
					if (_rand < 100) then {
						[%1] spawn fnc_injured;
					};
				};
			}]
		",[_x] call BIS_fnc_objectVar];
	};
	
	};
	
} forEach allUnits;
Additional Information

singleplayer

server

Event Timeline

sh4dow added a subscriber: sh4dow.May 28 2017, 3:46 PM