Jump to content
brians200

Randomly generated roadside IEDs

Recommended Posts

Guest

Updated version frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Just a question, due to the number of trigger used, is it possible to use this marvellous function on a headless client ?

Edited by Mariodu62

Share this post


Link to post
Share on other sites
You are close.

0 to 2 inclusive would be floor random 3

You don't need to worry about that warning for this instance. Only the server is running that code.

It is warning that if my computer generates a number and your computer generates a number, they probably aren't going to be the same.

Yup. Got it working *just right* now. Thanks! Any way to (offer as an option perhaps) make your IEDs set off mine detectors like vanilla ones do? Also I've been experimenting with using demolitions to take out an IED. Often the object the IED is linked to will not be destroyed although the IED itself is (destroyed). I haven't tested it with heavy caliber rifles like the m107 yet either...

Share this post


Link to post
Share on other sites

I am not sure how creating that mine icon works.. I suspect it involves having to change the config files to define the item as a mine. But if anybody knows for sure, feel free to let me know.

Have you edited any of the files? Can you check your rpt file and see if there are errors when that happens?

You will have to define the explosive bullets in the array in EPD\IED\ied.sqf

 explosiveBullets = ["B_20mm", "B_20mm_Tracer_Red", "B_30mm_HE", "B_30mm_HE_Tracer_Green", "B_30mm_HE_Tracer_Red", "B_30mm_HE_Tracer_Yellow", "B_30mm_MP", "B_30mm_MP_Tracer_Green", "B_30mm_MP_Tracer_Red", "B_30mm_MP_Tracer_Yellow", "B_35mm_AA", "B_35mm_AA_Tracer_Green", "B_35mm_AA_Tracer_Red", "B_35mm_AA_Tracer_Yellow", "B_40mm_GPR", "B_40mm_GPR_Tracer_Green", "B_40mm_GPR_Tracer_Red", "B_40mm_GPR_Tracer_Yellow"];

Share this post


Link to post
Share on other sites
I am not sure how creating that mine icon works.. I suspect it involves having to change the config files to define the item as a mine. But if anybody knows for sure, feel free to let me know.

Have you edited any of the files? Can you check your rpt file and see if there are errors when that happens?

You will have to define the explosive bullets in the array in EPD\IED\ied.sqf

 explosiveBullets = ["B_20mm", "B_20mm_Tracer_Red", "B_30mm_HE", "B_30mm_HE_Tracer_Green", "B_30mm_HE_Tracer_Red", "B_30mm_HE_Tracer_Yellow", "B_30mm_MP", "B_30mm_MP_Tracer_Green", "B_30mm_MP_Tracer_Red", "B_30mm_MP_Tracer_Yellow", "B_35mm_AA", "B_35mm_AA_Tracer_Green", "B_35mm_AA_Tracer_Red", "B_35mm_AA_Tracer_Yellow", "B_40mm_GPR", "B_40mm_GPR_Tracer_Green", "B_40mm_GPR_Tracer_Red", "B_40mm_GPR_Tracer_Yellow"];

As I said I am no scripter (yet! ;) ) I pulled up the rpt and did a search on it. Looks like there are plenty of errors for IED but I'm not sure what I'm looking at either. If you like here is the complete rpt from last night's experiments:

http://www.filedropper.com/arma32014-02-1015-19-17

Share this post


Link to post
Share on other sites

Can you send me your mission as well?

I ask, because it is naming variables with decimal places, which it shouldn't be doing...

Edited by brians200

Share this post


Link to post
Share on other sites

Seems like can't make it with A3MP mod like takistan

//["Name",[LocationX,LocationY,LocationZ],size]

predefinedLocations = ["city_Anar",[06000,07200],1000];

//http://community.bistudio.com/wiki/side

iedArray = [

["All",1000,"West"]

];

I wrote this both section but didn't work in Takistan

Share this post


Link to post
Share on other sites

It does work with A3MP maps

If you want to use the "All" location, you cannot give it a number afterwards.

iedArray = [
["All","West"]
];

If you predefine a location, you must add it to the IED array.

predefinedLocations = ["city_Anar",[06000,07200],1000];

iedArray = [
["city_Anar",5,10,"West"]
];

If you don't feel like predefining a location, you can just use its proper name.

iedArray = [
["Anar",5,10,"West"]
];

Edited by brians200

Share this post


Link to post
Share on other sites

Is there an eventhandler or a globalvariable tripped when an IED goes off? I'd like to have people come investigate when a bomb goes off...

Share this post


Link to post
Share on other sites

You can watch the variables of the IED you care about.

The items the IEDs are hidden are named ied_#, where the number corresponds to whichever one you care about.

When it blows up, it is deleted and that variable will become null, so use the isnull command.

The triggers of the primary IEDs are named with t_#, so if that becomes null and the ied_# is not null, it has been disarmed and you can quit watching.

Share this post


Link to post
Share on other sites

Hiya brians, chipping in to say thanks for the script, it's become great source of entertainment in our community.

The way I'm using it is on a training mission I've created for our community. I've laid a short course and a long course, the short course is 500 meters long and has eight IEDs and no fakes. The long course is two kilometres long and has fifteen IEDs and five fake IEDs. There is also a couple of patrols of OPFOR wandering up and down the path of the long course.

The way I'm trying to work it though is to have a single fireteam consisting of five members do a course, then move on to another part of the map. At the moment, if another fireteam wants to do the IED course, the server will have to be restarted to allow get the IEDs back up and running. Is there a way I can clear away the objects placed during the initialisation of the mission, then place the IEDs down in a new, random configuration? It seems like it should just be a case of re-initialising the script, but I don't think that will clear the old ones away.

Thanks again

Share this post


Link to post
Share on other sites

At the moment, it would require some hacky ways to clear everything out. In the next version, I will be adding a method to recreate the IEDs and clean them up.

If you want to attempt it until I have time to work on this, here are the variables you need to delete/stop.

Set these variables to 0

iedcounter

junkcounter

For each IED

//primary IEDs

ied_# - this is the actual object

t_# - this is the trigger detecting movement

pd_# - this is the script handle detecting planted projectiles and hand grenades.

//Secondary IEDs

secied_# - this is the actual object

st_# - this is the trigger detecting movement

pd_# - this is the script handle detecting planted projectiles and hand grenades (this is the same handle as before)

Then you can probably call the script again. I will try to get my update out when I get some more time.

Share this post


Link to post
Share on other sites

A gentleman and a scholar, if I get something working, I'll forward it on to you.

Share this post


Link to post
Share on other sites

Hi brains. This is an excellent script. it has deffinatly opened up a new possibility for mission editing.

I do have one question though. Would I would like to do is have it so when the mission is running from a dedicated server the IED locations show on the map.

Is it possible to do this? also, is it possible to change the text that is displayed and the marker type?

Share this post


Link to post
Share on other sites
Hi brains. This is an excellent script. it has deffinatly opened up a new possibility for mission editing.

I do have one question though. Would I would like to do is have it so when the mission is running from a dedicated server the IED locations show on the map.

Is it possible to do this? also, is it possible to change the text that is displayed and the marker type?

Aktivate the Debug in the init of the ied script. ^^

Share this post


Link to post
Share on other sites
Hi brains. This is an excellent script. it has deffinatly opened up a new possibility for mission editing.

I do have one question though. Would I would like to do is have it so when the mission is running from a dedicated server the IED locations show on the map.

Is it possible to do this? also, is it possible to change the text that is displayed and the marker type?

Not sure why you would want to show people where they were lol, but yep, easiest way is to set debug on. However you could also have it that the IED marker zones are visible instead, i.e. your players see the "zones" of IED probability rather than the individual bombs. I think we managed to break the Script at one point that hid them, I'll see if I can remember how I did it (doh!) unless Brians can tell us ?

SJ

Share this post


Link to post
Share on other sites

thanks for the replied guys. I wanted to show them for training people how to disarm them and find them

Share this post


Link to post
Share on other sites

If you want to have your zones showing up, set the following to false in Ied_Settings.sqf. I guess I should rename that variable to better match what it does...

hideIedMarker = true;

In terms of showing the actual IED marker to the player, it will require a little bit more work. Right now, they are shown to whoever passes the isServer check.

The first thing you will need to change is to remove the Local part of the marker stuff in these 3 files. This also brings up your next question. You can change the icon and the text here as well.

https://github.com/Brians200/EPD-IED/blob/master/EPD/IED/CreateIed.sqf#L47

https://github.com/Brians200/EPD-IED/blob/master/EPD/IED/CreateFake.sqf#L14

https://github.com/Brians200/EPD-IED/blob/master/EPD/IED/CreateSecondary.sqf#L47

If you want to leave debug turned off, you will also want to remove the if(EPD_IED_debug) check a few lines up.

Edited by brians200

Share this post


Link to post
Share on other sites

Thanks to everyone that replied. I have another quick question. Would anyone know why this is not working on a dedicated server? it works in the editor and when I host. But not when I load it on the server

Cheers,

Duck

Share this post


Link to post
Share on other sites

Works fine on ours... EVIL NASTY IEDs !!

Have you checked using debug ?

Share this post


Link to post
Share on other sites
Works fine on ours... EVIL NASTY IEDs !!

Have you checked using debug ?

EPD_IED_debug = true;

Share this post


Link to post
Share on other sites

Duck,

Using a debug console on the dedicated server, type this and run it locally.

 player setpos getpos ied_0;

This will teleport you right on top of the first IED created. If you go out into the ocean, then it isn't working. Let me know your results and I will see if I can help afterwards.

You can enable the debug console in your description.ext

https://community.bistudio.com/wiki/Description.ext#enableDebugConsole

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

×