ohally 26 Posted May 20, 2010 working on writing a simple IED script that will make a small marker around an object with the sqf launched in it's init line. I'm having trouble getting ti to create a trigger. This is very very basic so be nice, anyone see anythign wrong with this?? _IED = _this select 0; _caller = _this select 1; _id = _this select 2; _IEDpos = getpos _IED; _trg = createTrigger["EmptyDetector", _IEDpos]; _trg setTriggerArea [10,10,0,false]; _trg setTriggerActivation ["WEST","PRESENT",False]; _trg setTriggerTimeout [5, 5, 0, true ]; if (triggeractivated _rad) then {"bomb='Bo_GBU12_lgb' createVehicle (getPos _IED)"}; exit{}; Share this post Link to post Share on other sites
raedor 8 Posted May 20, 2010 _IED = _this select 0; _caller = _this select 1; _id = _this select 2; _IEDpos = getpos _IED; _trg = createTrigger["EmptyDetector", _IEDpos]; _trg setTriggerArea [10,10,0,false]; _trg setTriggerActivation ["WEST","PRESENT",False]; _trg setTriggerTimeout [5, 5, 0, true ]; waitUntil {triggeractivated _trg}; _bomb = 'Bo_GBU12_lgb' createVehicle (getPos _IED); This should work. You could also write the bomb code in the OnActivation field: http://community.bistudio.com/wiki/setTriggerStatements Share this post Link to post Share on other sites
ohally 26 Posted May 20, 2010 thanks trying it out now ---------- Post added at 03:37 PM ---------- Previous post was at 03:36 PM ---------- works perfect, thanks so much!!! Share this post Link to post Share on other sites
ohally 26 Posted May 20, 2010 another question... lets say i wanted to use Kron_UPSMON to place random objects that i want to define as IEDs. KRON UPSMON offers a "init:","YOUR INIT HERE" function however i can't seemt o figure out how to launch a seperate script using this. example: nul=[this,"AO","min:",2,"max:",5,"init:","nul=[this]execvm'scripts\ied.sqf';"]execvm"scripts\upsmon.sqf"; any ideas? Share this post Link to post Share on other sites
Wastelander 10 Posted May 25, 2010 (edited) thanks trying it out now---------- Post added at 03:37 PM ---------- Previous post was at 03:36 PM ---------- works perfect, thanks so much!!! OK - How get this to work and make go bang ? I have copied the text above and placed it in my mission directory called ied.sqf How do I set it to an object so when a player enters the are it goes bang? ps - Worked it out - Thanks ~~ Thanks Edited May 27, 2010 by Wastelander Share this post Link to post Share on other sites
jeza 5416 Posted May 25, 2010 Worked out what you put and added few bits myself, and works very well, few little lines can be added but so far mate its more than suitable :) . Share this post Link to post Share on other sites
takealready 1 Posted May 29, 2010 Thank you for the script Share this post Link to post Share on other sites
ohally 26 Posted July 1, 2010 I'm tweaking this script to allow for more realism, I will be releasing it soon and hopefully attempting to hard code it into the ied objects pack. My current version allows you to pick the size of the ied. my next step is to make it disarm able by engineering classes and possibly a weaponized version (able to be placed by opfor) for some PVP purposes. any other requests? Share this post Link to post Share on other sites
Bavator 8 Posted July 1, 2010 I'm tweaking this script to allow for more realism, I will be releasing it soon and hopefully attempting to hard code it into the ied objects pack. My current version allows you to pick the size of the ied. my next step is to make it disarm able by engineering classes and possibly a weaponized version (able to be placed by opfor) for some PVP purposes. Sounds great, Ohally! any other requests? Hm, I once tried to script a remote controlled IED but failed miserably :P IIRC I spawned a bad guy with a civ model, placed him on a street and if a Bluefor unit was in the proximity of the IED and he had a LoS to it --> BOOM Share this post Link to post Share on other sites
farside 6 Posted July 4, 2010 i've been looking elsewhere and not really found a answer to my question so i thought i'd continue this one a bit instead of clogging the forums with yet another IED trigger problem. I'm looking to have a trigger that when the enemy comes within 20m of the car , it blows. but i also want that if the car has been destroyed the bomb does not go off. i've tried a few methods alive car and !alive car but both of them seem to make it blow at the wrong times, any ideas folks? Share this post Link to post Share on other sites
f2k sel 164 Posted July 4, 2010 (edited) Well you could try creating a trigger and attaching it to the car. trigger setup as follows assuming the bomber is a civilian named civ1 and the vehicle named car1 axis 8 by 8 Civilian present once name trig1 condition this on act civ1 = "ARTY_R_227mm_HE" createVehicle [getpos civ1 select 0,getpos civ1 select 1, 0];car1 = "ARTY_R_227mm_HE" createVehicle [getpos car1 select 0,getpos car1 select 1, 0] create the car name the vehicle car1 and in the init put trig1 attachto [car1,[0,0,0]] create the man and name him civ1 when the civilian gets within 8meters of the car it should blow up. for a remote control bomb name the car car1 and place a trigger set to radio alpha and put this in the on act car1 = "ARTY_R_227mm_HE" createVehicle [getpos car1 select 0,getpos car1 select 1, 0]; To make things a little more realistic you could have the unit carrying a suitcase to do that place a suitcase on the map (small objects) and name s1 and then in the init put this s1 attachto [civ1, [0.035,-.055,-0.22], "LeftHandMiddle1"]; s1 setdir 90 Edited July 4, 2010 by F2k Sel Share this post Link to post Share on other sites
farside 6 Posted July 4, 2010 that could work but then it limits it only to a single person, i was thinking any blufor steps into that trigger, bang. unless the cars been taken out beforehand. Share this post Link to post Share on other sites
f2k sel 164 Posted July 5, 2010 (edited) Then just attach the trigger to the car as above,set the trigger detect blufor condition this and alive car1 on act who = thislist select 0;who = "ARTY_R_227mm_HE" createVehicle getpos who;car1 = "ARTY_R_227mm_HE" createVehicle getpos car1 that will blow up the car and to make sure blow up whoever activated the trigger Edited July 5, 2010 by F2k Sel Share this post Link to post Share on other sites
PSYKO_nz 44 Posted July 6, 2010 hi there i like the look of your script, i havnt tryd it yet but i will soon, i was wondering (ive also got a post up about this) is there a way to set your ied script so wen some one interacts with the object it causes it to go off, in my mission ive planted a gold ak, a cople of my clan are realy into them for some reason, i have the ied add on from armaholic, any way, i want it so that the boys are going thru and one of them may spot the gold ak and go over to it, if they pick it up (this addaction "pick up gold ak") it detonates, if they spot the wires and reolise its an ied and dont activate it (pick it up) nothing happnes, same for the dead dog ied if they see it and (this addaction "you kick my dog") activate it, they go boom, no activation = no boom if you get my drift any ideas? Share this post Link to post Share on other sites
f2k sel 164 Posted July 6, 2010 (edited) All you would need to do is place the bomb code into the script called by the addaction. Make sure to name the object you've booby trapped and pass that to the bomb so it knows where to explode. place this in the addaction script. bomb = "ARTY_R_227mm_HE" createVehicle getpos nameofobject You may want to look at other types of explosives as that one is quite large. Edited July 6, 2010 by F2k Sel Share this post Link to post Share on other sites
PSYKO_nz 44 Posted July 6, 2010 Wicked, ill give it a go!! Share this post Link to post Share on other sites
PSYKO_nz 44 Posted July 6, 2010 Works realy good, however on the mp server when someone triggers it we all die, even wen were no were near the ied/explosion any ideas??? Share this post Link to post Share on other sites
f2k sel 164 Posted July 6, 2010 Works realy good, however on the mp server when someone triggers it we all die, even wen were no were near the ied/explosionany ideas??? I haven't done any MP but it sounds as if the script is running on all sever. You could try this at the begining of the code if(!isServer) exitWith{}; Share this post Link to post Share on other sites
Joshii 10 Posted July 6, 2010 why not just add an action for the bad guy to blow it up? Share this post Link to post Share on other sites
PSYKO_nz 44 Posted July 7, 2010 I haven't done any MP but it sounds as if the script is running on all sever.You could try this at the begining of the code if(!isServer) exitWith{}; ive tryd it and now it wont work on the server, any other ideas? Share this post Link to post Share on other sites
f2k sel 164 Posted July 7, 2010 I have to admit I'm only guessing, do all clients have the code as well. Maybe you could post the full code so someone might be able to help. Share this post Link to post Share on other sites
McSpuds 10 Posted August 18, 2010 OK here is how I got it to work as a IED. Make a trigger: axis:8x8 activation: anything but a civilian present once name:trig1 Condition: this on act: car1 = "ARTY_R_227mm_HE" createVehicle [getpos car1 select 0,getpos car1 select 1, 0]; Create a civilian car Name: car1 initialization: trig1 attachto [car1,[0,0,0]] when whoever you have set in the trigger to activate gets within 8 meters, "Kaboom!" Share this post Link to post Share on other sites
aker 12 Posted February 4, 2011 (edited) Hey all! I've been added simply an IED object from the mission editor of the OA, than I placed a trigger over it with the following command line: [ied, "Large"] exec ied.sqs (it is active when BLUEFOR reaches the area) Okay, it works like a charm, but the object of the IED is still remaining. How to hide an object auto after exploded? Used the IED Script v1.2. Thanks! Edited February 4, 2011 by AkeR Share this post Link to post Share on other sites
f2k sel 164 Posted February 4, 2011 I don't really get the question but to delete an object just use deletevehicle objectsname place it in the script after the bomb has exploded Share this post Link to post Share on other sites