Jump to content
Sign in to follow this  
mikie boy

[FOCK]ers IED

Recommended Posts

lol. thanks for helping!!

---------- Post added at 00:52 ---------- Previous post was at 23:57 ----------

Oh well.. still no luck. I'm curious Mikie, Did you actually get one to explode? If so, what vehicle? I'm seeing them on roads and can defuse them just fine. They just don't seem to be any threat. I used HMMWV GPK and SOV vehicles. Parked over 6 or 7 IEDs for about 20 seconds each. Nothing :(

Share this post


Link to post
Share on other sites

Do they work when u r on foot? I ran up to one and Then it exploded. Didn't try in car as I was teleporting around the map

Share this post


Link to post
Share on other sites

Check to see if u can detonate by walking Up Then we know the type if vehicle is and issue. I've used this in a few missions with no probs using vehicles but they have all been vanilla oa

Share this post


Link to post
Share on other sites

Hi Mikie, I can try that this afternoon. The vehicles I'm using are vanilla OA, I believe. BTW - I'm running SP, and not on server. That is okay, right?

--

at work at the moment, so can't test.. but what I gather is.. On start up, the following from Fock_iedinit.sqf adds the 'clear' action to the IEDs (after placing them) and then sets variable "Rigged" _random (either 0 or 1) and TRUE... then passes them to Fock_road_ied.sqf

_iedfound = [nil, _ied, "per", rADDACTION, "Disarm Ied","FOCK_ied\Fock_iedclear.sqf",[],6,false,true,"","(_target distance _this) < 3"] call RE;
	call compile format['
		_ied setVehicleInit "
		this setVehicleVarName ""ied%1"";
		ied%1 = this;
			";
			', _i];
		_ied setVariable ["Rigged", _random, true];
		null = [_ied] execVM "FOCK_ied\Fock_road_ied.sqf"; 

So, I believe this is running ok, since I clearly see the addaction to clear the IEDs..

From Fock_road_ied.sqf ... we should continue running while _ied is not null and at least one is active (1)

I had added some HINT codes for testing.. in the following and noticed it was never hit.. after approaching and setting on the ied;


while {((!isnull _ied) and (_active == 1))} do 
{

  waituntil {count playableUnits >= 1};
//	_searchtarget = nearestobjects [_ied,["CAManBase","Car","Tank","truck"],15]; 
_searchtarget = nearestobjects [_ied,["CAManBase","LandVehicle"],20]; 
_targetlist = [];
	{	
	 if (side _x == WEST && isPlayer _x) then 
	  {
		   _targetlist =  _targetlist + [_x];
	  };	
	}foreach _searchtarget;	

I played around with the _searchtarget lines but was never able to hit them. I will do more testing...

the iedDetect.sqf script is working fine too ;) Thanks for taking the time to help out :)

Edited by smacker909

Share this post


Link to post
Share on other sites

ive just tried your map and drove one of the HMVV into a town - both ieds went off - i have no mods running whatsoever when i tested it. So it worked fine for me. any other infor you can give me to assist target the problem?

Share this post


Link to post
Share on other sites

Hmm.. okay, thanks for testing. I'm running SP, not on server. I have no other ideas. I'll keep digging.

Share this post


Link to post
Share on other sites

Great script has really added to our missions

All working great on dedi with the exception of one issue - we cant seem to destroy the IED factory when we find it.

Should the factory be destroyable?

Once the factory is destroyed does it stop producing IEDs or do we just have to kill the bomb maker to halt the production of IED's?

Thanks in advance

EDIT: Tested without ACE and it worked fine - Tested with ACE and the factory becomes indestructable. Any ideas?

Edited by Doodle

Share this post


Link to post
Share on other sites

Hey Mikie, This is the line that was getting me;

waituntil {count playableUnits >= 1};

I guess SP (non server) doesn't like it. Commented it out and works fine.

Thanks again for the script! :)

Share this post


Link to post
Share on other sites

Ah nice one, glad u got it working. Sorry that was designed to halt everything when player all left server.

---------- Post added at 08:32 AM ---------- Previous post was at 08:28 AM ----------

Doodle, check the event handle for the tent . Think u need pipe bombs to blow it. Can't remember if they are used in ace. Maybe that is the prob? If I get a chance I'll take a look. Glad u like the script .

Share this post


Link to post
Share on other sites

No worries. Love the IED's added to my mission. Adds a whole new level of intrigue. lol

Share this post


Link to post
Share on other sites
Ah nice one, glad u got it working. Sorry that was designed to halt everything when player all left server.

---------- Post added at 08:32 AM ---------- Previous post was at 08:28 AM ----------

Doodle, check the event handle for the tent . Think u need pipe bombs to blow it. Can't remember if they are used in ace. Maybe that is the prob? If I get a chance I'll take a look. Glad u like the script .

Mikie Boy: Just to let you know I commented out the //IEDFactory addEventHandler ["HandleDamage",{(_this select 4) == "PipeBomb"}]; and it now works perfect. Probably a better way of doing it but this cheap and dirty way solved my problem.

Thanks

Share this post


Link to post
Share on other sites

nice one -you can always insert the name of the pipe bombs used in ace instead of "pipebomb". make sure the suicide bombers are edited out if you havent downloaded them :) - theres a link in this thread

Share this post


Link to post
Share on other sites
nice one -you can always insert the name of the pipe bombs used in ace instead of "pipebomb". make sure the suicide bombers are edited out if you havent downloaded them :) - theres a link in this thread

Weird thing is the satchel charge in ACE is called "pipebomb" so there is no difference in name - tried with a few other munitions but same result - To use in an ACE mission I have to comment out the handledamage eventhandler.tp be able to blow the factoory.

Also Am I correct in thinking that once the IED factory is destroyed then no more IED's are spawned?

Thanks

Share this post


Link to post
Share on other sites
Also Am I correct in thinking that once the IED factory is destroyed then no more IED's are spawned?

nope they continue to spawn - every 10 or so IEDs found then another factory is added - didnt get round to doing more with it to be honest.

As for the ACE mod - not sure how to change that sorry dude - Although ive used Ace in past not really scripted with it

Share this post


Link to post
Share on other sites

Not sure if it is me but when we defuse IED's we get a message about Updating location on Factory but we get nothing else I thought we would get a marker set on the map of approx location ?

Should I ?

Share this post


Link to post
Share on other sites

Hi Mike,

first of all thanks a lot for this awesome script. I'm gonna port the actual 2.71 Domination to Fallujah and would like to place some IED all over the city.:devil: For vehicles the script works fine but I would like to change some parameters and appreciate your assistance.

1) Why do IED's react on "Landvehicles" only ? I found the following in "Fock_road_ied"

_searchtarget = nearestobjects [_ied,["[color="#FF0000"]CAManBase[/color]","LandVehicle"],20]; 

Well, I'm a noob but I assume that "CAManBase" stands for all (west) infantry units. Unfortunately this does not work for me. :( Infantry untis do not trigger the IED's.

2) Due to the size of the city I would like to increase radius around "centre" where IED's will be placed by the script. Found the following in "Fock_iedinit"

_distanceaway = [color="#FF0000"]650[/color];

I assume again that this could be the distance around "center" in metres. Is that correct?

3) Increasing the radius to i.e. 4000m I also need to increase the amount of IED in that area. Where do I find that parameter?

4) A vehicle is able to detect IED's. I would like to enable engineers to detect IED's, too. What do I have to do?

Thank you ! :)

Share this post


Link to post
Share on other sites

If i remember correctly, the infantry units will detonate or not the IED, based on a random value defined in another script (some init). So you'd have to approach several IEDs to check that. On the other hand, vehicles will always detonate it.

Share this post


Link to post
Share on other sites

try changing it to "man" but it should work regardless, both on vehicle and man- are you using ACE? if so for some reason it doesnt work with ACE -

same code used on Fockers Most Wanted - works no probs

_distanceaway = 650; - yep change this for the distance away from the town/village - dont make it too far otherwise it wont be worth it.

for "_i" from 0 to 100 do - change to say 300 would be enough - too many on the server will slow it up as each ied is searching for the man/landvehicle

4) A vehicle is able to detect IED's. I would like to enable engineers to detect IED's, too. What do I have to do?

you can amend the ied detect script so that it only activates when the Engineers are drivers or in vehicle - or you can make an addaction that runs the ied detect script for say 40 secs and then cancels. or can run it all the time. should take much to do

hope this helps - any more probs let me know

Share this post


Link to post
Share on other sites
try changing it to "man" but it should work regardless, both on vehicle and man- are you using ACE? if so for some reason it doesnt work with ACE -

No ACE! Guess it is like BlackMamb explained one post before. Where do I find this "random value" to increase the chance of a detonation triggered by infantry?

_distanceaway = 650; - yep change this for the distance away from the town/village - dont make it too far otherwise it wont be worth it.

What do you mean with "won't be worth it?" Fallujah is huge and I'm going to cover the city limits. That's why I also asked how to increase the quantity of IED's.

for "_i" from 0 to 100 do - change to say 300 would be enough - too many on the server will slow it up as each ied is searching for the man/landvehicle

Thank you !

A vehicle is able to detect IED's. I would like to enable engineers to detect IED's, too. What do I have to do?

you can amend the ied detect script so that it only activates when the Engineers are drivers or in vehicle - or you can make an addaction that runs the ied detect script for say 40 secs and then cancels. or can run it all the time. should take much to do

Think you misunderstood me. Sorry, my bad. Actually only the driver of a vehicle is able to detect IED's. We fight mainly on foot through Fallujah and I would like to give an Engineer the abilty to detect IED's when we bring peace and democracy to the people of Fallujah on foot. ;)

Edited by CHB68

Share this post


Link to post
Share on other sites
No ACE! Guess it is like BlackMamb explained one post before. Where do I find this "random value" to increase the chance of a detonation triggered by infantry?

unfortunately he is wrong - there isnt any code that made a random choice as to whether the IED goes off.

basically each IED searches for a man or landvehicle - it then checks what that item is - is it west side and is it a human player?

if it is a landvehicle - then create a bomb at the location of the IED - ELSE

if its not and its not disarmed, then start the count down...

if by the time the count down has finished (about 15 seconds at best) check to see if its still active - if so create a bomb at the IED location.

thats it... So no random value im afraid - it means some thing is interfering with it - possibly the variables Active or Rigged are used else where in your mission - try changing these names to say FOCK_Active and FOCK_Rigged - changed them in all the scripts within fock_ied folder.

A good way to test it is change line 28... if (_target isKindOf "LandVehicle") then to >>>> if (_target isKindOf "Man") then - a bomb should go off straight away

As for the Engineer script i did know what you wanted, i think you misunderstood me LOL - when i mentioned Addaction - i meant attach it to an engineer - that way he can call the ied detect script for say 40 seconds and then it turns off - or you can place the code on him all the time - just put IEDEng = [] execvm"FOCK_ied/FOCK_iedDetect.sqf"; in their init

then (not tested) - changed the script fock_iedDetect to the following

///////////////////////////////////////////////////////////
// [FOCK]ers IED detection - Vehicle
// [FOCK] Mikie J
////////////////////////////////////

//if (!(isServer)) exitwith {};
private ["_list","_unit","_range","_target","_class"];
_unit = _this select 0;
//_pos = _this select 1; 
//_unitdriver = _this select 2; 

while {(alive _unit)} do {
//waituntil {isplayer _unitdriver}; 
   _list = nearestobjects [_unit,["Land_IED_v1_PMC","Land_IED_v2_PMC","Land_IED_v3_PMC","Land_IED_v4_PMC"],45]; 

   if (count _list >=1) then
     {	

     hint "Warning IED detected!"; 
      _target = _list select 0;
	 while {((alive _target)and(position _unit distance _target <45))} do
	 {		
	_loc = getPos _target; 
	_dist = _unit distance _target;
	_metres = floor _dist; 		
//            _unit vehicleChat format ["Warning IED detected! %1 metres Away",_metres]; 
           hintSilent format ["Warning IED detected! %1 metres Away",_metres]; 
//             _unit vehicleChat "test";
          	sleep 0.5;
	};
		if (position _unit distance _target > 45) then
		{
		hint "IED now out of range";
		};
   };
//    else
//    {
//	     "searching";
//	    
//	    };

   sleep 1.5;
};

Hopefully that was of some use to you - otherwise welcome to chuck me your mission and i can test it - do you have any other mods running with it?

Share this post


Link to post
Share on other sites

Huh. I might have an older version, or i missed something. In FOCK_iedinit, there's a random value that defines if the ied is "rigged" or not. In FOCK_road_ied, depending if that value is 0 or1, the coundtdown starts or the ied just waits until the target is further than 25m away.

Share this post


Link to post
Share on other sites

alas its not random - 0 is not rigged - 1 is rigged - all IED are set as rigged when placed - and only does it become not rigged when an engineer or someone else disarms it. The it is removed - hopefully that will shed some light on CHB68's problem :)

what i think you may have seen was this...

// _random = [0,1] call BIS_fnc_selectRandom;

// _ied setVariable ["Rigged", _random, true];

but this is not used and was only to test for a side IED script. :)

oh on a side note - engineers disarm IEDs faster than any other type of player if it helps with the detection script.

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  

×