BNRG fnc suicideBomber: Difference between revisions

From Benargee's Wiki
Jump to navigation Jump to search
m (cat)
Line 1: Line 1:
[[Category:Arma 3 Functions]]
[[Category:Arma 3 Functions]]
===Code===
===Code===
Define this some where first!
  '''BNRG_fnc_suicideBomber''' = {
  '''BNRG_fnc_suicideBomber''' = {
  _expl1 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this);
  _expl1 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this);
Line 23: Line 24:
  true;
  true;
  };
  };
===Syntax===
===Syntax===
  _unit call '''BNRG_fnc_suicideBomber''';
  _unit call '''BNRG_fnc_suicideBomber''';

Revision as of 20:53, 27 March 2015

Code

Define this some where first!

BNRG_fnc_suicideBomber = {
_expl1 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this);
_expl1 attachTo [_this, [-0.1,0.1,0.15],"Pelvis"];
_expl1 setVectorDirAndUp [[0.5,0.5,0],[-0.5,0.5,0]];
_this setVariable ["expl1", _expl1];
_expl2 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this);
_expl2 attachTo [_this, [0,0.15,0.15],"Pelvis"];
_expl2 setVectorDirAndUp [[1,0,0],[0,1,0]];
_this setVariable ["expl2", _expl2];
_expl3 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this);
_expl3 attachTo [_this, [0.1,0.1,0.15],"Pelvis"];
_expl3 setVectorDirAndUp [[0.5,-0.5,0],[0.5,0.5,0]];
_this setVariable ["expl3", _expl3];
_this addAction ["Allahu Akbar", 
	{
		_bomber = (_this select 0); 
		_bomber removeAction (_this select 2);
		{_x setdamage 1} foreach [_bomber getVariable "expl1",_bomber getVariable "expl2",_bomber getVariable "expl3"];
	}, 
	nil, 1.5, true, true, "", "cameraon == _target" ];
true;
};

Syntax

_unit call BNRG_fnc_suicideBomber;

_unit: Object

Examples

Inside a unit's init field

null = this call BNRG_fnc_suicideBomber;