Jump to content
Sign in to follow this  
DeathF0X

Simple Suicide Bomber Script

Recommended Posts

Hey, here is my simple suicide bomber script.

You can add player classes which the suicide bomber will attack.

The next release include alice support for random suicide bomber action :yay:

Put it in the Init of a civilian.

nul=[this] execVM "suicide_bomber.sqf";

V1.0

suicide_bomber.sqf

private ["_player","_suicidebomber","_playerarray","_nmax","_select"];
_suicidebomber = _this select 0;


waitUntil {_suicidebomber distance player  <= 25};
//hint"in distance 25m";

//Player Classes Change to attack
_playerarray = nearestObjects [_suicidebomber, ["US_Army_Soldier_SL","US_Soldier_EP1","US_Soldier_Medic_EP1","US_Soldier_Engineer_EP1"],30];
_nmax = count _playerarray;
_select =floor(random _nmax);
_player = (_playerarray select _select);

//hint"found my target and ready to go";
waitUntil {_suicidebomber distance _player   <= 15};

_suicidebomber SetSpeedMode "Full";
_suicidebomber SetCombatMode "Red";
_suicidebomber SetBehaviour "Careless";

hint"Allua Akba";
//get a sound file
//_suicidebomber say3D "xyz";

_suicidebomber domove getpos _player;    

waitUntil {_suicidebomber distance _player  <= 3};

if ((alive _suicidebomber) AND (_suicidebomber distance _player  <= 4)) then {

"ARTY_Sh_105_HE" createVehicle getPos _suicidebomber;

}else
{
//Code if failed
};

Edited by skullfox

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×