• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Suicide !

Newbie Spellweaver
Joined
Jan 26, 2015
Messages
67
Reaction score
0
Hello,

I Don't know if it's possible for now.

I would like to add Suicide fonction, and set a Key for that.

I already see the FSM, and i think is not complete


[/URL]Thanks for your help :D
 
Skilled Illusionist
Joined
Jul 27, 2006
Messages
357
Reaction score
25
Well I found the suicide function definition in DZ\server\scripts\init.sqf, it was commented and you're welcomed to test it and tell us if it works.
Search for :
Code:
player_suicide = {
	_fsm = [_person,_this] execFSM "\dz\server\scripts\fsm\player_suicide.fsm";
	_person setVariable ["fsm_suicide",_fsm];
};

event_animHook =
{
	//[SurvivorPartsFemaleWhite:0:0,3,"fired"]
	_agent = _this select 0;
	_value = _this select 1;
	_type = _this select 2;
	
	hint "test!";
	
	switch (_type) do
	{
		case "fired":
		{
			_fsm = _agent getVariable ["fsm_suicide",-1];
			hint "bang!";
			if (_fsm < 0) exitWith {};
			hint "bang bang!";
			_fsm setFSMVariable ["_fired",true];
		};
	};
};
If it's commented uncomment it.
 
Newbie Spellweaver
Joined
Jan 26, 2015
Messages
67
Reaction score
0
Thanks for reply

In my init.sqf, i have the same text

But it doesn't works, and i don't know how to execute the fonction
 
Back
Top