Jump to content
Sign in to follow this  
Reezo

SR5 Tactical IED Detection and Remote Det Script

Recommended Posts

1 Triggerman 1 IED. All kids must share equal fun.

Share this post


Link to post
Share on other sites

Cheers mate. I dont have OA so I cant run the sixth sense mission. And the triggerman script I am using is IEDdetect_triggerman.sqf

I can get the civvi trigger man to detonate himself but not a Skoda car.

Edited by ckolonko

Share this post


Link to post
Share on other sites
Amazing! But I won't look into it because I have v1.5RC8 almost ready.

Oh goody! Can't wait to see the new version!

Share this post


Link to post
Share on other sites

RC7 was good in terms of ideas, not so much in terms with coding, lol

I am staying home sick (flu) so release times might shorten :)

Share this post


Link to post
Share on other sites

Oh man .... get well soon. I've heard that coding an IED script helps people feel better ;)

Share this post


Link to post
Share on other sites

Is there a way to make this script reactivate after i die? I read darkeclips post but did not understand his instructions

Share this post


Link to post
Share on other sites

V1.5RC8 released!

This is probably going to be the last RC before the official stable release. I have tested this version extensively and - for the moment - everything works.

Expect less baby-care support from this moment on, ladies :)

Check first post, updated version of Sixth Sense working as well.

Changelog:

V1.5RC8:

- FIXED: Various bugfixes in the triggerman and triggerman-spawn scripts

- IMPROVED: More realistic behavior and decision-making for the triggerman

- IMPROVED: Better handling of damage for attached IEDs and the related detonation

- IMPROVED: Optimized code

- CHANGED: Attached IEDs no longer visible on the roof of a vehicle

To those whose questions I have not answered: I do not answer to what I do not know or did not have enough time to build a reasonable knowledge, sorry.

Share this post


Link to post
Share on other sites

Reezo,

I like it when your sick :)

Thanks for the rapid turn around, I `ll test the same things I did last night and get back to you with results.

EDIT:

You are a star, all fixed works a treat, even the triggers I built ! Well done that man, tested the same as last night and all good :)

BTW - Have a word with Kylania ref the Suicide IED script. His has the guy running at you when he chooses a victim. Adds a whole element of immersion and fear !

Edited by UGLY58

Share this post


Link to post
Share on other sites

I was born sick but not that kind of sick that keeps one home for 2-3 days with fever lol

Anyway thank YOU guys for the extensive testing..I know it has been a long way but I don't like staying 1 month in silence to do one release..it kills my motivation, I prefer to release RCs that people can try out and track progress with.

I will add the 'run to victim' in the final stable version :) it is not hard, I has something like that in mind just for when the triggerman is a suicide bomber and not a remote detonator.

Now, one last thing I would love to add is a script that knows all the map city centers and places triggers automatically, for the spawn..

This will be the treat for final v1.6

Share this post


Link to post
Share on other sites

Loving the script Reezo. Got it to work!!!!!

Also a quick suggestion for the future. I think it would be good if the IED's could be set off via a 'pressure plate'/trigger.

Edited by ckolonko

Share this post


Link to post
Share on other sites
Now, one last thing I would love to add is a script that knows all the map city centers and places triggers automatically, for the spawn..

This will be the treat for final v1.6

and THAT ladies and gentlemen is the icing on the cake - the Holy Grail of IED scripts !

To be able to drop a script into ANY mission (with SILVIE and ALICE or not) and have the bejaisus scared out of you, where you can trust NOONE would be great!

It's great having a small part in testing some of this stuff and watching it grow (and Reezo's fame grow with it !)

BRAVO mate ..... BRAVO !

Share this post


Link to post
Share on other sites

@ckolonko the pressure plate idea is nice. I might add a specific script to, it is not going to be hard after all this :)

@Kremator thanks man. I think I have it down even better: I am going to create a script that works as some sort of Ambient Combat Module:

- works by being run in init.sqf

- scans for group leaders and works for them, only

- scans for the leader to be in proximity of a group of civilians

- checks % against your user-configure %

- applies the triggerman spawn script on one of those civilians, which basically does the same thing as dynamically placing a trigger everywhere you go :)

This means:

- not dependent from ALICE and SILVIE

- not dependent from city centers

= maximum compatibility on every scenario :)

Share this post


Link to post
Share on other sites

I just added three different behaviours to the suicide bomber:

1) Surrender, pray and detonate

2) Shout, run to victim, detonate

3) Run to victim, shout, detonate

33% chance each. 10 lines of scripting..a lot more fun :)

Share this post


Link to post
Share on other sites

In a script-eous way lol

War movie 101 ;)

I'll make sure the pressure-based detonation script is also present in the final version. I am going to make it so you place an object near a road, init it with the script and it will be triggered by something as heavy as you decide (man,cars etc.)

This is what is shaping to be IEDdetect_ambientBombers.sqf

coding on top of my head..

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: Reezo of SR5 Tactical - www.sr5tactical.net
// IED Detection and Disposal Scripts
//////////////////////////////////////////////////////////////////

// INIT
if !(local player) exitWith{};
if (player != leader group player) exitWith{};
private ["_civilians","_vehicles","_triggerman","_minNumber","_chance","_interval","_IEDtype","_beep","_scanArea","_fearArea","_detArea","_enemySide","_rnd","_fate","_actualPos","_y"];

waitUntil {reezo_IEDdetect_initComplete};

_minNumber = _this select 0;
_chance = _this select 1;
_interval = _this select 2;
_IEDtype = _this select 3;
_beep = _this select 4;
_scanArea = _this select 5;
_fearArea = _this select 6;
_detArea = _this select 7;
_enemySide = _this select 8;

_civilians = [];
_vehicles = [];

// MAIN LOOP
while {alive player} do {

 //RANDOMIZE BASED ON CHANCE AND RUN CODE ONLY IF TRUE (SAVES CYCLES IN ACCORDANCE WITH KYOTO PACTS)
 _fate = random 100;
 if (_fate < _chance) then {
   //CHECK HOW MANY CIVILIANS ARE IN THE AREA
   _nearPeople = (getPos player) nearObjects ["Man",200];
   for [{_y = 0},{_y < (count _nearPeople)},{_y = _y + 1}] do {
     if (side (_nearPeople select _y) == CIVILIAN) then {
       _civilians = _civilians + [_nearPeople select _y];
     };
   };
   //PROCEED ONLY IF ENOUGH CIVVIES ARE FOUND
   if (count _civilians >= _minNumber) then {
     if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: ENOUGH CIVILIANS FOUND" };
     _triggerman = (_civilians select (floor (random (count _civilians))));
     _rnd = random 1;
     _nearCars = (getPos _triggerman) nearObjects [_IEDType,_scanArea];
     //DECIDE: SUICIDE BOMBER OR TRIGGERMAN?
     if (_rnd < 0.5 && count _nearCars > 0) then {
       for [{_y = 0},{_y < (count _nearCars)},{_y = _y + 1}] do {
         _vehicles = _vehicles + [_nearCars select _y];
       };
       _bomb = (_vehicles select (floor (random (count _vehicles))));
       if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: BOMB IS OBJECT" };
     } else {
       _bomb = _triggerman;
       if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: BOMB IS TRIGGERMAN" };
     };
     //FINALLY ACTIVATE THE SON OF A BITCH
     nul0 = [_triggerman,_bomb,_beep,_fearArea,_detArea,_enemySide] execVM "scripts\IEDdetect\IEDdetect_triggerman.sqf";
     while {position player distance position _triggerman < 200 && alive _triggerman) do {
       if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: WAIT TYPE 2" };
       sleep _interval;
     };
   };
 } else {
   //YOU NEVER GET ENOUGH SLEEP WHEN YOU ARE A LAZY PERSON
   if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: WAIT TYPE 3" };
   sleep _interval;
 };

 //SLEEP IF PLAYER DOES NOT MOVE FROM THE AREA
 _actualPos = getPos player;
 while {_actualPos distance position player < 200} do {
   if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: WAIT TYPE 1" };
   sleep _interval:
 };
}; //END MAIN LOOP

// END
if (reezo_IEDdetect_debug) then { player globalChat "DEBUG IEDDETECT_AMBIENTBOMBERS: SCRIPT COMPLETE" };
if (true) exitWith{};

Edited by Reezo
lusty code tag

Share this post


Link to post
Share on other sites

This is actually GREAT for maps like Fallujah where ALICE does not work!

The cool thing is you can run both scripts in random order, you don't need mine to be before or after that one, for any reason. It works as a continuous check around the player with various optimizations..so if civilians spawn at a later time (even mission based ones!) it will work anyway..

Share this post


Link to post
Share on other sites

Check out the other great scripts that shuko has as well ... some GREAT ones. Me not being a coder is a real shame sometimes ... so glad there are people like you around Reezo to make up for my shortcomings :)

Share this post


Link to post
Share on other sites

Will do, definitely. Things are looking good here, I should be able to have the script done anytime soon.

Edited by Reezo

Share this post


Link to post
Share on other sites
Now, one last thing I would love to add is a script that knows all the map city centers and places triggers automatically, for the spawn..

You need a hand with this, I've got the code right here...:)

If you want to cater for custom city locations also, use this method.

waitUntil{!isNil "BIS_fnc_init"};
{
_twn = _x;
} foreach (bis_functions_mainscope getvariable "locations");

Share this post


Link to post
Share on other sites

Thanks Wollfy!

I've made my script "follow" the group leader rather then the city locations, as a sort of Ambient Combat Module, only for triggermen/suicide bombers. This way you could always find a suicide bomber in the middle of a desert road, or any other place not directly related to city locations.

The script works on group leaders and starts off when a determined quantity of civilians are found in proximity of the leader. If the leader stays still in the same location, the script will pause. It will also pause once a triggerman is created to avoid spamming suicide bombers eheh

but thanks, i've been wondering about that for really a long time..I knew it could be done because Mando Missile has that in the Navigation menu :)

Future Changelog for v1.6:

V1.6

- ADDED: "Ambient Bombers" Script: dynamic random creation of suicide bombers and triggermen among civilian (from ALICE or editor-placed)

- ADDED: Pressure plate/proximity IED, can be set to anti-personnel or anti-vehicle, detonates on pressure

Share this post


Link to post
Share on other sites

Reezo,

1. I already have (in my mind) your trigger script working with ambient civilians at least on Takistan. Being that its trigger based with civilians present, this trigger only becoming true when civilians are generated by ALICE2 as players approach. Ambient vehicles is still a little dummer but provides cars for the car bombs.

2. I am looking at various bits of "furniture" such as market stalls. garbage bins etc to run as additional IED object possibilities, replacing the "car" class type in the trigger. Be even nicer if that could be made random, but my scripting knowledge ends at the mission writing stage. I guess a random IED object generator within the trigger action would do the trick, spawn the random item, attach IED, generate trigger man. Is this in the realms of possibility ?

3. I would like to test your pressure plate IED script but I am not sure on how to set it. Via Trigger or item init ? It would be nice to again make this random, either by position or item. Makes missions so much more repeatable.

4. Nice to see the suicide bombers doing random actions, nice touch.

5. Electronic counter measures. Be nice to have a bomb jammer instead of a detector, more realistic. This should be able to jam long range remote detonated bombs, but obviously not the pressure plated items. This should really be for wireless remote detonated devices, where you can put the trigger man up on a hill with a set of binos and a radio trigger. I have this observation routine working on OPFOR artillery observers, should be able to make long range triggermen like this. The nice ballancer is if people stay in a vehicles protective EW bubble they would be safe.

6. More ideas to come, awesome script, its adding nice polishing touches to my soon to be public beta mission, that you will love. Its going to be as real as I can get.

Share this post


Link to post
Share on other sites

Regarding the Pressure Plate IED. Is there a way to make it so that the position can be set but will randomly appear?

Edited by ckolonko

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×