Jump to content
brians200

Randomly generated roadside IEDs

Recommended Posts

Hey man, me again, another question:

Right now you use an addAction for the disarm functionality. I was wondering if you could help me how I could get this to be done with an AGM interaction. You can find the function over here: https://github.com/KoffeinFlummi/AGM/blob/master/AGM_Interaction/functions/fn_addInteraction.sqf any help would be much appreciated :) Thanks in advance!

Share this post


Link to post
Share on other sites

Well the addAction is here...

DISARM_ADD_ACTION = {
_sectionName = _this select 0;
_iedName = _this select 1;
_iedArray = [_sectionName, _iedName] call GET_IED_ARRAY;
_itemRequirement = "";
for "_i" from 0 to (count itemsRequiredToDisarm) -1 do{
	_itemRequirement = _itemRequirement + format[" and ((items player) find ""%1"" > -1)", itemsRequiredToDisarm select _i];
};
(_iedArray select 0) addAction [("<t color=""#27EE1F"">") + ("Disarm") + "</t>", DISARM_ACTION, [_iedArray,[_sectionName, _iedName]], 10, false, true, "", format["(_target distance _this < 3) %1", _itemRequirement]];
};

For your parameters...

0- (_iedArray select 0)

1- ("<t color=""#27EE1F"">") + ("Disarm") + "</t>"

2,3 - format["(_target distance _this < 3) %1", _itemRequirement] //This includes the distance and the condition. Currently looks something like (_target distance _this < 3) and ((items player) find toolkit > -1) and ...

4- I guess this is what happens when the interaction happens??? You need to call DISARM_ACTION with these parameters: [_iedArray,[_sectionName, _iedName]]

5- False

6- I used 10 for priority so it would usually show up at the top of the list

Beyond that, you are on your own as I have no idea what AGM is. Good luck!

Share this post


Link to post
Share on other sites

so i ran into a bug today that had me pulling my hair out lol

im creating a scripted mission and have EPD as well as Grimes revive script executing before my "if (!isServer) exitWith {};" statement. When i run EPD before the revive script, the revive script throws an error something to the effect that the position variable of the player is undefined. Im assuming, because i had blacklist markers defined in the settings for EPD, that it deletes all positions within the area of the blacklisted marker? I dunno. Didnt look into it in detail.

Needless to say, my problem was fixed by running the script which relied on the position of the editor placed unit the player is initially spawning into before running EPD. For safe measure i took out any blacklisted markers in EPD settings as well.

DISREGARD!! i screwed up :icon_mrgreen:

although.. it seems i am getting some interference with blastcore as far as the explosions. It seems to lag a bit before the explosions awesome dust cloud. Does anyone know a way to check if the player is running that mod so i can then turn off this feature? Testing in a mission on hosted server.

Edited by Baconator

Share this post


Link to post
Share on other sites

If you know of something blastcore adds to the config, you can check to see if it exists fairly easily.

Share this post


Link to post
Share on other sites

I've been trying to mess around with this for a while, but can't get it to work. In Arma there are now actual IEDs (IEDLandBig_F, IEDLandSmall_F, IEDUrbanBig_F, IEDUrbanSmall_F) which would work perfect for this script. However, when setting these items in the array no object gets created and thus no IED. Could you help me out with this? I've already tried using createVehicle in some places but that didn't do anything either.

Share this post


Link to post
Share on other sites

Ah alright, fair enough.. Still a pity though.. Also, I didn't know you discontinued it. Real shame, your script is the best out there ;(

Share this post


Link to post
Share on other sites

Hiya...implemented your script here into Duws Modified mission with full credits (thank you!)

I was wondering if you already know about the following rpt error? In a 1 hour session it got spammed approx. 40,000 times:

--------------------------------------------------------------------------------

Error select: Type Object, expected Array,String,Config entry

File mpmissions\__cur_mp.Altis\EPD\IED\TriggerFunctions.sqf, line 48

Error in expression <ED_ARRAY;

_iedPos = getpos (_iedArray select 0);

_minDistance = 10000;

_minHe>

Error position: <select 0);

_minDistance = 10000;

_minHe>

-------------------------------------------------------------------------------

If you figure it out could you either PM me or post the code change I need to make on my end so I can fix it?

Thanks again Brian, very much!

Share this post


Link to post
Share on other sites

I just downloaded arma to check. I am not getting any script errors on the IED Sample Mission. I haven't touched this code since April and nobody else has complained about it, so I am going to guess you made a mistake during your implementation. Try out the sample mission on your computer and see if you get any script errors.

Share this post


Link to post
Share on other sites

I cant reproduce it playing alone...it only happened when I had a connected client in a self-hosted session. I didnt do anything special with the install...just plug and play the way you had it without making any changes, except to turn off the debug markers of course. Who knows...could have been a mod he was running that the IED script didnt care for...I have no idea. I would try to test it more for you and report back but im having trouble enough getting my own MP testers together these days while testing my own stuff, lol.

Share this post


Link to post
Share on other sites

Hey Brian,

I really like the mod and it works great with one exception. I'm not getting a disarm option.

I'm using a player with a toolkit as configured.

Any ideas?

Thanks,

Share this post


Link to post
Share on other sites

Most errors occur in the Ied_Settings.sqf file. Either post that file or your mission and I can take a look.

Share this post


Link to post
Share on other sites

Ok, I was just moving toward it too quickly. On a slow crawl, I was able to get close enough to get the disarm option.

Thanks again - great work!

Share this post


Link to post
Share on other sites

What is the license of your project? I'd love to include it in a CooP framework I am working on if possible. PM me if needed.

Share this post


Link to post
Share on other sites

The license is free and open to the public to do whatever they would like to do with it, I am not responsible for the consequences :). You have my permission to use/modify/distribute my script. Let me know if you need anything else and good luck! If you are feeling generous, feel free to throw my name somewhere.

Share this post


Link to post
Share on other sites
The license is free and open to the public to do whatever they would like to do with it, I am not responsible for the consequences :). You have my permission to use/modify/distribute my script. Let me know if you need anything else and good luck! If you are feeling generous, feel free to throw my name somewhere.

Thank you! I will be sure to provide attribution as I believe every author deserves to have their name associated with their work. If I make any improvements, I will be sure to send it your way for inclusion into your project. Although certiantly not required, if you continue developing for Arma, I'd check into picking a license for each project such as Creative Commons or the Arma Public License. This helps others know what your wishes are for your projects and sets certain rules such as if Developer B takes your work and improves it, under a Sharealike license you are free to backport the improvements into the source project and guarantees that others can use and build upon the work of Developer B as well.

It seems you have worked on this project for some time, I personally find it easiest to setup a code repository for each of my projects to track changes and invite others to help work on my code. Only a suggestion but bitbucket/github are amazing for dev projects. I personally prefer the GIT client Smartgit but I know github has their own as well.

Just throwing ideas out there I have learned over time, take what you can use and leave the rest ;)

Share this post


Link to post
Share on other sites

Hello,

This project has been suspended indefinitely since June as my job does not allow me to develop code for public consumption. I will put a link on the front post pointing to where I announced this.

http://forums.bistudio.com/showthread.php?170703-Randomly-generated-roadside-IEDs&p=2713536&viewfull=1#post2713536

And I definitely have had it in a git repo from the beginning ;)

Share this post


Link to post
Share on other sites

not bad had in mind to port the ides over from arma 2 but cant fin the texture would be nice to use with this script

Share this post


Link to post
Share on other sites

Good day. I hope that the author of this good mod is still here. I want to ask - I have included your mod in my mission, and I have a problem. Not to disarm the explosives in the mission running on a dedicated server (when scrolling the mouse wheel does not appear function "Disarm".) But in the editor when you start the mission, everything works (Function "Disarm" is available and works). Please help solve this problem. I did not change mod. All the mod is set by default.

Share this post


Link to post
Share on other sites

Brians is unlikely to respond as he's under embargo these days regarding code - if you've not messed with the mod in anyway it's 90% likely you're missing something. Just check that your EOD guys are using the right "Mine Disarm" tools

i.e. Do your "Disarmers" have the right tools in their inventory i.e. detector/toolbag ?

SJ

Share this post


Link to post
Share on other sites

All parameters are correct ( itemsRequiredToDisarm = ["ToolKit"]; betterDisarmers = ["B_soldier_exp_F", "B_engineer_F", "B_diver_exp_F", "B_recon_exp_F"]; ). Type of soldiers and the right tools. In the editor, everything is working correctly. A dedicated server is not.

On a dedicated server option "Disarm" does not appear when inspecting explosives.

Edited by Disab

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

×