brians200 51 Posted April 7, 2014 https://github.com/Brians200/EPD-IED/blob/master/EPD/IED/DisarmFunctions.sqf#L45 If you keep repeating with lines 45 and 46, you can make it as long as you want. You can even choose different animations to go along with it. Share this post Link to post Share on other sites
Vasilyevich 20 Posted April 8, 2014 (edited) is there a way to change the explosion size of IEDs ? like a "M_Mo_120mm_AT" for example :) - Nevermind, found it. Great script, thank you for sharing it! Would still be nice to know how to decrease the trigger radius. - Nevermind, found that to, would be nice to make it more visible tough.. Edited April 8, 2014 by Vasilyevich Share this post Link to post Share on other sites
brians200 51 Posted April 8, 2014 https://github.com/Brians200/EPD-IED/blob/master/EPD/IED/CreationFunctions.sqf#L173 The trigger size is on line 173. there is also one in the secondary method down below on 231 Share this post Link to post Share on other sites
brians200 51 Posted April 8, 2014 Version 2.3 Triggers are now created and deleted as they are needed to reduce the strain on the server. Only IEDs with a soldier or vehicle within 250 meters of them will have a trigger actively checking for victims. Fixed the "bucket bug". This should remove the lag the explosions were creating on servers with more than a few players. Special thanks to serjames Smoke plumes now travel much faster. Reduced the number of plumes for each IED. Small IED: 0-7 Medium IED: 5-19 Large IED: 15-34 [*] Rocks are now flung a little bit farther so you can see them outside of the smoke. [*] Other small particle tweaks. [*] Fixed shrapnel logic so it produces different amounts based on the size of the IED. (The code was in the wrong order in the last release, causing it to produce the same amount for every IED) Download Here v2.3 To update your missions Save the old IED_Settings.sqf. Replace the EPD folder with the new one. Put your old IED_Settings.sqf back in. Share this post Link to post Share on other sites
serjames 357 Posted April 8, 2014 I can confirm it works brilliantly now - much less lag (lag free as of latest testing yesterday) and the explosions are most impressive !! Great job Brians200 !! SJ Share this post Link to post Share on other sites
Guest Posted April 8, 2014 New version frontpaged on the Armaholic homepage. Randomly generated roadside IED's v2.3 ================================================ 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
phronk 898 Posted April 8, 2014 Agreed with serjames! The latest release performs noticeably better during initialization and even the explosion doesn't cause bad frame drops (for me, anyway) anymore. Love the variety in shrapnel with the different IED sizes, too. Very good update! :D Share this post Link to post Share on other sites
Vasilyevich 20 Posted April 8, 2014 The Trigger size line is now here: https://github.com/Brians200/EPD-IED/blob/master/EPD/IED/TriggerFunctions.sqf#L18 if someone wants to adjust that :) Share this post Link to post Share on other sites
Moon_chilD 200 Posted April 9, 2014 I have a question: (At first I test on Takistan right now, but got the same on Altis) Can IEDs only spawn in Towns/Villages/Cities or also on roads in the outskirts?! For me they only spawn in these areas! Share this post Link to post Share on other sites
brians200 51 Posted April 9, 2014 If you are using any of these, ["All", side] ["AllCities", side] ["AllVillages", side] ["AllLocals", side] It will only spawn them in the towns and villages. You have to actually tell it what roads you want if you want to spawn them outside of towns. Share this post Link to post Share on other sites
brians200 51 Posted April 10, 2014 I have created an update tutorial for this script. It includes all the ied array approaches, adding and removing ieds during the mission, and how to use the safezone. Share this post Link to post Share on other sites
giallustio 770 Posted April 10, 2014 Why don't have just one main loop and not a loop for each ied? Share this post Link to post Share on other sites
brians200 51 Posted April 10, 2014 Can you describe to me the advantage of using a main loop for all of them? I am just not immediately seeing it. This is the way I see it. With individual threads: They spend the majority of their time sleeping, causing very little processor use They can keep track of their own variables When I tell it to sleep for 5 seconds, they rely on the scheduler for keeping track of the timing With a loop: If a mission maker has a large number of IEDs, now there is a giant loop running every so often. (Periodic lag) The IEDs are stored in a triply nested dictionary, rather than a single array. To loop through them, I have to generate a lot of key sets. I would have to continuously look up variables that the current IED needs to do the computation I now have to worry about timing issues to keep it checking every 5 seconds. If the loop takes 3.5 seconds, I have to keep track of that Share this post Link to post Share on other sites
giallustio 770 Posted April 10, 2014 I'm not really sure about performance, but i think that one loop it's better than 100. I didn't check what you need to store in them, so probably individual loop is better in this case. I hope that someone with more experience than me can answer my question Share this post Link to post Share on other sites
Moon_chilD 200 Posted April 12, 2014 If you are using any of these, ["All", side] ["AllCities", side] ["AllVillages", side] ["AllLocals", side] It will only spawn them in the towns and villages. You have to actually tell it what roads you want if you want to spawn them outside of towns. Ahhh Okay, I though "All" would do that. For all who wants to know, I solved it pretty easy. I got the position which is pretty much in the middle of the map. Then I created a predefined Location and mad the Radius 8000 (Takistan). Now the IEDs also spawn randomly on the Roads! Thanks brains200, the tutorial inspired me. xD Share this post Link to post Share on other sites
kilo1-1 1 Posted April 15, 2014 Is it just me or does this script not work correctly for Fallujah? When I have the script spawn IEDs over the entire map, it only spawns 11 IEDs and 11 fakes, and they are all right next to each other. I can't even get marker IED spawns to work correctly either (it doesn't spawn anything). Share this post Link to post Share on other sites
brians200 51 Posted April 15, 2014 Can you send me your mission and a link to the mods required? The marker method is described at 17 minutes and 22seconds of the tutorial video Share this post Link to post Share on other sites
kilo1-1 1 Posted April 15, 2014 It may have something to do with ALIVE but my mission is just a simple convoy mission with ALIVE activated on the Fallujah map using A3MP. I tried using the "All", "AllCities", and "AllVillages" methods and those weren't working properly (they just spawn small amounts of IEDs in the city). One workaround I can use is by using a single marker. My apologies for saying the markers don't work correctly, I was having it call IEDs to three different markers instead of just one, I didn't see that I had three markers put into the array. As such, is there anyway to have it call IEDs to multiple markers instead of doing the predefined location method? Share this post Link to post Share on other sites
brians200 51 Posted April 15, 2014 (edited) Looking at the config for Fallujah.. There are only 11 places classified as cities, and they range from 50-100ish meters in size. For a location that size. the script decides it should only place 1 ied. You won't be able to use the "All" ones. However, you most definitely use multiple markers. Here is a sample mission with 3 markers. http://elektropd.com/wp-content/uploads/2014/04/fallujah.fallujah.zip Edited April 15, 2014 by brians200 Share this post Link to post Share on other sites
kilo1-1 1 Posted April 16, 2014 Thanks for the clarification for the config part, I knew something was off with it spawning so little IEDs around the city. I just ended up redoing the entire .sqf how I originally wanted it and it worked just fine the second go around. And with the help of your sample mission and tutorial video, I have made several additional scenarios for Fallujah. Thanks again for your help! Share this post Link to post Share on other sites
DRACUS 18 Posted April 18, 2014 (edited) Hello, Im working in 1 mission.. and i cant call your script on dedicated server, on host work but on server dont work :( am i miss something..? When the mission is on the map(Briefing) before begin show the markers on the map with Black borders. Mods of the mission are: CBA,Alive,Fata_a3,Clafghan,A3MP, A3MP_AP . INIT.SQF /* * Filename: * init.sqf * * Description: * launched on mission start * * Created by [KH]Jman * Creation date: 07/12/2013 * Email: jman@kellys-heroes.eu * Web: http://www.kellys-heroes.eu * * */ // ==================================================================================== // DEFINES #define PP preprocessfilelinenumbers #define VAR_DEFAULT(var,val) if (isNil #var) then {var=(val);} // ==================================================================================== // SETUP private ["_d"]; gameOver = false; if (count playableUnits == 0) then {SP = true} else {SP = false}; // ==================================================================================== // MAIN //Grab parameters and put them into readable variables for [ {_i = 0}, {_i < count(paramsArray)}, {_i = _i + 1} ] do { call compile format [ "PARAMS_%1 = %2", (configName ((missionConfigFile >> "Params") select _i)), (paramsArray select _i) ]; }; if (!isDedicated) then { initClientSaveLoadout = compile PP "functions\fnc_initClientSaveLoadout.sqf"; }; if (PARAMS_ReviveEnabled == 1) then { call compile preprocessFile "=BTC=_revive\=BTC=_revive_init.sqf"; if (PARAMS_MedicMarkers == 1) then { _null = [] execVM "misc\medicMarkers.sqf"; }; if (!isDedicated) then { [5] spawn initClientSaveLoadout; }; }; if (PARAMS_PlayerMarkers == 1) then { _null = [] execVM "misc\playerMarkers.sqf"; }; if (isDedicated) exitWith { "addToScore" addPublicVariableEventHandler { ((_this select 1) select 0) addScore ((_this select 1) select 1); }; }; [] call compile PP "briefings\briefing.sqf"; [] spawn {call compile preprocessFileLineNumbers "EPD\Ied_Init.sqf";}; 0 = execVM "IgiLoad\IgiLoadInit.sqf"; [] execVM "zlt_fastrope.sqf"; sleep 10; Ied_Settings.SQF /***************SETTINGS***********************/ EPD_IED_debug = false; hideIedSectionMarkers = true; //sets the alpha to 0 after spawning IEDs at a section hideSafeZoneMarkers = true; //sets the alpha to 0 of a safezone itemsRequiredToDisarm = ["ToolKit"]; //"MineDetector" or "ToolKit" for example betterDisarmers = ["B_soldier_exp_F", "B_engineer_F", "B_diver_exp_F", "B_recon_exp_F"]; // people who are better at disarming baseDisarmChance = 75; //how well everybody can disarm bonusDisarmChance = 20; //increase that the "betterDisarmers" get secondaryChance = 50; //Chance that a secondary IED will spawn. smallChance = 20; //Chance that a small IED will be chosen. mediumChance = 40; //Chance that a medium IED will be chosen. largeChance = 40; //Chance that a large IED will be chosen. iedSecondaryItems = ["Land_CanisterOil_F","Land_FMradio_F","Land_Canteen_F","Land_CerealsBox_F","Land_BottlePlastic_V1_F","Land_HandyCam_F","Land_PowderedMilk_F","Land_RiceBox_F","Land_TacticalBacon_F","Land_VitaminBottle_F","Land_BottlePlastic_V2_F"]; iedSmallItems = ["RoadCone_F","Land_Pallets_F","Land_WheelCart_F","Land_Tyre_F","Land_ButaneCanister_F","Land_Bucket_F","Land_GasCanister_F","Land_Pillow_F"]; iedMediumItems = ["Land_Portable_generator_F","Land_WoodenBox_F","Land_MetalBarrel_F","Land_BarrelTrash_grey_F","Land_Sacks_heap_F","Land_WoodenLog_F","Land_WoodPile_F"]; iedLargeItems = ["Land_Bricks_V2_F","Land_Bricks_V3_F","Land_Bricks_V4_F","Land_GarbageBags_F","Land_GarbagePallet_F","Land_GarbageWashingMachine_F","Land_JunkPile_F","Land_Tyres_F","Land_Wreck_Skodovka_F","Land_Wreck_Car_F","Land_Wreck_Car3_F","Land_Wreck_Car2_F","Land_Wreck_Offroad_F","Land_Wreck_Offroad2_F"]; //If you want to use locations without making markers on the map, define them here. Altis has been provided as an example. ***THESE ARE NOT WHERE THE ACTUAL IEDS ARE SPAWNED*** //["Name",[LocationX,LocationY,LocationZ],size] predefinedLocations = []; iedPredefinedLocationsSize = count predefinedLocations; /***************EXPERIMENTAL***********************/ // This is still being worked on and may contain bugs, please report them on the forums. allowExplosiveToTriggerIEDs = true; /***************END EXPERIMENTAL*******************/ //These are the actual IEDs that will spawn. Add them using one of the following formats. //mapLocations must have their type defined as one of "NameCityCapital","NameCity","NameVillage", "NameLocal" //["All", side] //["AllCities", side] //["AllVillages", side] //["AllLocals", side] //["mapLocation", side] //["mapLocation", amountToPlace, side]; //["mapLocation", iedsToPlace, fakesToPlace, side] //["mapLocation", amountToPlace, [fakeChance, smallIedChance, mediumIedChance, largeIedChance], side] //["predefinedLocation", side] //["predefinedLocation", amountToPlace, side]; //["predefinedLocation", iedsToPlace, fakesToPlace, side] //["predefinedLocation", amountToPlace, [fakeChance, smallIedChance, mediumIedChance, largeIedChance], side] /*********Marker size > 1**********************/ //["marker", amountToPlace, [fakeChance, smallIedChance, mediumIedChance, largeIedChance], side] //["marker", iedsToPlace, fakesToPlace, side] //["marker", amountToPlace, side] //["marker", side] /*********Marker size = 1**********************/ //["marker", side] //["marker", chanceToBeReal, side] //["marker", [fakeChance, smallIedChance, mediumIedChance, largeIedChance] , side] //The side can be a single side, or an array of sides //Ex. "West" or ["West,"East"] //http://community.bistudio.com/wiki/side iedInitialArray = [ ["RandomIED1_Marker",6,4,"West"], ["RandomIED2_Marker",6,2,"West"], ["RandomIED3_Marker",6,4,"West"], ["RandomIED4_Marker",6,4,"West"], ["RandomIED5_Marker",6,4,"West"], ["RandomIED6_Marker",6,4,"West"], ["RandomIED7_Marker",6,2,"West"] ]; //Place the mapLocations, predefinedLocations, and markerNames of places you don't want any IEDs spawning iedSafeZones = []; Edited April 18, 2014 by DRACUS Share this post Link to post Share on other sites
brians200 51 Posted April 18, 2014 Using an admin debug console, type "iedDictionary" into one of the fields. If it is working, it will look something like this http://i.imgur.com/m8zmu6E.jpg If it didn't load any ieds, it will just have empty brackets [[],[]] If it is blank it isn't working at all. Can you confirm it isn't working? If it isn't working, please send me your mission, so I can see what is happening. Share this post Link to post Share on other sites
DRACUS 18 Posted April 18, 2014 well on host preview Works, on dedicated not.. i will send u the mission.. Share this post Link to post Share on other sites
brians200 51 Posted April 18, 2014 In case anybody has a similar issue. The problem was that he has "if (isDedicated) exitWith {}" 2 lines up above the ied call, so the server isn't running the ied code. Share this post Link to post Share on other sites