BNRG fnc suicideBomber
Jump to navigation
Jump to search
Code
Define this somewhere 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;