Jump to content
Sign in to follow this  
Yottahertz_

Running Suicide bomber

Recommended Posts

Okay so heres the story, I am using the a suicide bomber script (originally for Armed Assault) it's working, but I would like to know how to have the suicide bomber run at any BLUFOR unit?

I'm new to scripting and editing so have not a clue

Share this post


Link to post
Share on other sites

be something like

_suicidebomber =  "mental guy";           //bomber name
_suicidepos =  getpos _suicidebomber; //Bomber location

waitUntil { sleep 1; ( {side _x == WEST && (_x distance _suicidepos) < 10} count allUnits) > 0 };

_units = []; // all WEST units within 10m of _suicidepos
{
 if (side _x == WEST && (_x distance _suicidepos) < 10) then {
   _units set [count _units, _x];
 };
} forEach allUnits;  

_suicidebomber DoMove _units;

Please don't take this code as final. This is simply a brief idea on how to acheive what you are looking for. Expect to mess about with this code to get it working.

Share this post


Link to post
Share on other sites

unfortunately u need to continually have the unit run at the player - if you run from the last position, then that's where he stops. you have to take account for this - check [Fock]ers Suicide for how i did the script. basically the unit detects you then follows u until you run too far.

oops forgot the link - https://dl.dropboxusercontent.com/u/17725328/Focker_Scripts/Fock_SBomb.rar

Edited by Mikie boy

Share this post


Link to post
Share on other sites

Yeah that would simply be a matter of plaing the code in a loop for instance

_suicidebomber =  "mental guy";           //bomber name
_suicidepos =  getpos _suicidebomber; //Bomber location

waitUntil { sleep 1; ( {side _x == WEST && (_x distance _suicidepos) < 10} count allUnits) > 0 };


while (_terroise) do  {
_units = []; // all WEST units within 10m of _suicidepos
{
 if (side _x == WEST && (_x distance _suicidepos) < 10) then {
   _units set [count _units, _x];
 };
} forEach allUnits;  

_suicidebomber DoMove _units;

if (!alive _suicidebomber) then [exitwith];
sleep 1; } 

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  

×