Yottahertz_ 51 Posted May 4, 2013 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
bangabob 45 Posted May 4, 2013 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
mikie boy 18 Posted May 4, 2013 (edited) 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 May 5, 2013 by Mikie boy Share this post Link to post Share on other sites
bangabob 45 Posted May 4, 2013 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
zooloo75 834 Posted May 5, 2013 http://forums.bistudio.com/showthread.php?154465-Suicide-Bomber-Script&p=2388515#post2388515 Made this just for you :) Share this post Link to post Share on other sites