BNRG fnc suicideBomber: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Shortened a little bit) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Arma 3 Functions]] | |||
===Code=== | ===Code=== | ||
Define this somewhere first! | |||
'''BNRG_fnc_suicideBomber''' = { | '''BNRG_fnc_suicideBomber''' = { | ||
_expl1 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this); | _expl1 = "DemoCharge_Remote_Ammo_Scripted" createVehicle (position _this); | ||
Line 17: | Line 19: | ||
_bomber = (_this select 0); | _bomber = (_this select 0); | ||
_bomber removeAction (_this select 2); | _bomber removeAction (_this select 2); | ||
{_x setdamage 1} foreach [ | {(_bomber getVariable _x) setdamage 1} foreach ["expl1", "expl2", "expl3"]; | ||
}, | }, | ||
nil, 1.5, true, true, "", "cameraon == _target" ]; | nil, 1.5, true, true, "", "cameraon == _target" ]; | ||
true; | true; | ||
}; | }; | ||
===Syntax=== | ===Syntax=== | ||
_unit call '''BNRG_fnc_suicideBomber'''; | _unit call '''BNRG_fnc_suicideBomber'''; |
Latest revision as of 05:37, 28 March 2015
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); {(_bomber getVariable _x) setdamage 1} foreach ["expl1", "expl2", "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;