Shinotama 10 Posted July 23, 2010 Hey guys, I'm new to the whole editing thing, spent many a hour recently trying to get to grips with things.. I require help in finding out exactly where you put any SQF files if you need to use them and also I am after a simple to implement IED script that can attach itself to a person or vehicle so that it may drive along a road etc. Thank you for your help in advance =) Share this post Link to post Share on other sites
rexehuk 16 Posted July 23, 2010 The IED Script I always use: ; Improvised Explosive Device Script ; By Jeevz converted to armaII by Matt R ; v1.2 12/13/06 ; This script will create an explosion of a ; selected size on any object when called ; The arguments are [objectName, explosionPower] ; Explosion Power will be 1 of 4 choices ; Small - Good for Anti-Personnel use ; Medium - Will usually disable a Humvee without killing the occupants ; Large - Will usually destroy a passing humvee and kill or severly injure all occupants, will disable the tracks and possibly engine on M1A1 ; Huge - Nothing will survive, I mean... it's HUGE :-) ?!IsServer: exit ; Example script call --> [theCar, "Small"] exec "xaScripts\xaIED.sqs" ;start script _theObject = _this select 0 _theExplosion = _this select 1 ;locate the Object to be blown up _bombLoc = GetPos _theObject _bombLocX = _bombLoc select 0 _bombLocY = _bombLoc select 1 _bombLocZ = _bombLoc select 2 ; Deterimine the ordinance used to create the explosion ? (_theExplosion == "Small") : _ammoType = "R_57mm_HE" ? (_theExplosion == "Medium") : _ammoType = "M_Sidewinder_AA" ? (_theExplosion == "Large") : _ammoType = "SMAW_HEDP" ? (_theExplosion == "Huge") : _ammoType = "Bo_GBU12_LGB" civvy1 globalchat _ammoType ; Get the explosion size and blow the object up ? (_theExplosion == "Small") : goto "SMALL" ? (_theExplosion == "Medium") : goto "MEDIUM" ? (_theExplosion == "Large") : goto "LARGE" ? (_theExplosion == "Huge") : goto "HUGE" #SMALL _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _theObject setdammage 1 civvy1 globalchat "Small" exit #MEDIUM _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _theObject setdammage 1 civvy1 globalchat "Medium" exit #LARGE _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _theObject setdammage 1 civvy1 globalchat "Large" exit #HUGE _ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ] _theObject setdammage 1 civvy1 globalchat "Huge" exit If you want to add the possibility of disarming it you can also add this action to your IED. // Sarge's amazing IED scripting thingy // Make sure you have "ACE_wirecutter" somewhere for people to pick up // _hohoho = this addaction ["Attempt Disarm", "disarmied.sqf"]; _ied = _this select 0; _someidiot = _this select 1; _hascutter = _someidiot hasWeapon "ACE_wirecutter"; _someidiot playmove "amovpercmstpsraswrfldnon_gear"; disableuserinput true; _someidiot sideChat "Attemping IED Defusal, keep at a safe distance"; if (_hascutter) then { sleep 5; deleteVehicle _ied; _someidiot sideChat "IED Defused"; disableuserinput false; _someidiot playmove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"; } else { _luck = round(random 5); _wittyvariablename = _luck >= 4; if (_wittyvariablename) then { sleep 5; deleteVehicle _ied; _someidiot sideChat "IED Defused"; disableuserinput false; _someidiot playmove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"; null = [objNull, ObjNull, tskObj3, "Succeeded"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf"; tskObj4 setTaskState "Succeeded"; } else { sleep 5; disableuserinput false; _someidiot switchmove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"; _someidiot sideChat "Leave me! Get out of here and save yourselves"; sleep 15; "ACE_Bo_Mk82" createvehicle (getpos _ied); "ACE_Bo_Mk82" createvehicle (getpos _ied); "ACE_Bo_Mk82" createvehicle (getpos _ied); deleteVehicle _ied; null = [objNull, ObjNull, tskObj3, "FAILED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf"; tskObj4 setTaskState "Failed"; }; }; Obviously you'd want a trigger area near the IED so it goes off within a certain time if you are near it. That second defuse script has a chance calculation in it which is cool, makes your missions a bit more dynamic. Share this post Link to post Share on other sites
Shinotama 10 Posted July 23, 2010 Thats pretty awesome thanks =) My only other question, is that people keep referencing to those "SQF" files... Where do they go in the ARMA 2 folder? As I spent 30 minutes trying to put it in the correct place the other day only to fail -_- Share this post Link to post Share on other sites
Dynamic Echo 10 Posted July 25, 2010 (edited) On second thoughts, I was wrong - I would like to know as well though :D Edited July 25, 2010 by Dynamic Echo Share this post Link to post Share on other sites
viper[cww] 14 Posted July 26, 2010 you have to put your .SQF files in your arma 2 documents folder, find your mission that you want to have the .SQF file in, and place them there (if you use another profile then go to arma 2 other profiles\yourname\your_mission Share this post Link to post Share on other sites
Durka-Durka 10 Posted August 2, 2010 Having some problems with the difusal options. I'm not running ACE, how should the script look if one wants to make it compatable with just OA? Share this post Link to post Share on other sites
crazy_usmc 10 Posted June 25, 2011 I've got a question. I've watched vids and read other post from many different sites about this script and I've done exactly what it says to (saved in my documents arma2 mission folder) but when I get into range of the trigger I get an error saying "ied.sqs not found" can anyone offer some help? I am a newbie when it comes to scripting ;D Share this post Link to post Share on other sites
rawrbear 10 Posted June 27, 2011 That's because there seems to be a spelling mistake in the script text. [theCar, "Small"] exec "xaScripts\xaIED.sqs" should read [theCar, "Small"] exec "xaScripts\xaIED.sqf" Share this post Link to post Share on other sites
Tankbuster 1746 Posted June 27, 2011 You sure? That script looks like sqs to me. Share this post Link to post Share on other sites
rawrbear 10 Posted June 27, 2011 It's sqs coding but I was assuming that the guy posting it had saved as an sqf as that's what the OP asked for. Altering the code seems to have it still work find, though I suppose it would be better to save the scriptas .sqs rather than .sqf. Share this post Link to post Share on other sites
Tankbuster 1746 Posted June 27, 2011 If it was SQF, it'd need to be called by execVM, too. Share this post Link to post Share on other sites
darkxess 60 Posted July 3, 2011 Check out this: Simple IED Example Comes with a demo mission too :) Share this post Link to post Share on other sites