Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2017-05-08 10:19        
     
Hello,

Seem to have found a bug using the brilliant Advance Interaction Module where a handcuffed unit would have a 10second+ delay on the death animation?

I've searched the forum and found some information regarding switching an animation, apparently a script needs an 'animation loop' which allows the unit to change stance before the death animation can occur?

Still haven't found anything conclusive on this issue, I'm guessing I would have to create some kind of trigger which would allow the unit change stance?

The script for the arrest is here I'm sure this could be edited slightly to allow another sqf script?

// CBA EventHandlers
// The code on this will be run on all clients.

//============== ARREST ==========
 
// START of ArrestScript.sqf - Called on the start of the Arrest
	["gbl_arrestSuspect", {
		private ["_gen", "_caller", "_id"];
		_gen = _this select 0;
		_caller = _this select 1;
		_id = _this select 2;
			_gen SetVariable ["gbl_arrested", true, true];
			//ANIMATION
			_gen setCaptive true;
			_gen switchmove "UnaErc_UnaErcPoslechVelitele";
			
			_gen SetVariable ["gbl_suspect", true, true];
			_gen SetVariable ["gbl_control_suspect", false, true];
		ProcessInitCommands;
	}] call CBA_fnc_addEventHandler;


//============== CONTROL ==========

// CONTROL.SQF - called when moving the suspect
	["gbl_controlSuspect", {
		private ["_gen", "_caller", "_id"];
		_gen = _this select 0;
		_caller = _this select 1;

			_gen SetVariable ["gbl_control_suspect", true, true];
			_gen switchmove "UnaErc_UnaErcPoslechVelitele";
			_gen setUnitPos "UP";

		ProcessInitCommands;
	}] call CBA_fnc_addEventHandler;


//============== HOLD ==========

// HOLD.SQF - Called after moving the suspect
	["gbl_holdSuspect", {
		private ["_gen", "_caller", "_id"];
		_gen = _this select 0;
		_caller = _this select 1;
		_id = _this select 2;


			_gen SetVariable ["gbl_control_suspect", false, true];

			// Animation
			_gen switchmove "CivilSitting";
			_gen setdir (getdir _caller);

		ProcessInitCommands;
	}] call CBA_fnc_addEventHandler;


//============== RELEASE ==========

//RELEASE.SQF - Called when releasing the suspect
	["gbl_releaseSuspect", {
		private ["_gen", "_caller", "_id"];
		_gen = _this select 0;
		_caller = _this select 1;
		_id = _this select 2;

			// PLAYING ANIMATION
			_gen switchmove "UnaErcPoslechVelitile_UnaErc"; 
			_gen setCaptive false;
			_gen setUnitPos "AUTO";
			_gen SetVariable ["gbl_arrested", false, true];
			_gen SetVariable ["gbl_control_suspect", false, true];
			_gen SetVariable ["gbl_suspect", false, true];
		ProcessInitCommands;
	}] call CBA_fnc_addEventHandler;

//============== END OF SCRIPT ==========

I'm sure something is missing here? Any help would be very much appreciated this bug looks awful.

Thankyou for your time and hope to speak soon.