<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title><![CDATA[Bohemia Interactive Forums - ARMA 2 & OA : MISSIONS - Editing & Scripting]]></title>
		<link>http://forums.bistudio.com/</link>
		<description><![CDATA[For discussing the technical aspects of creating custom ARMA 2 & the standalone expansion Operation Arrowhead missions as well as scripting.]]></description>
		<language>en</language>
		<lastBuildDate>Wed, 19 Jun 2013 07:06:35 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.bistudio.com/images/misc/rss.png</url>
			<title><![CDATA[Bohemia Interactive Forums - ARMA 2 & OA : MISSIONS - Editing & Scripting]]></title>
			<link>http://forums.bistudio.com/</link>
		</image>
		<item>
			<title>Getting HC to activate DAC triggers</title>
			<link>http://forums.bistudio.com/showthread.php?157098-Getting-HC-to-activate-DAC-triggers&amp;goto=newpost</link>
			<pubDate>Wed, 19 Jun 2013 01:02:57 GMT</pubDate>
			<description>Hello, Currently im using this guide to get HC working in one my missions http://dl.dropboxusercontent.com/u/6920345/HC_tutorial/hc_tutorial.pdf . It...</description>
			<content:encoded><![CDATA[<div>Hello, Currently im using this guide to get HC working in one my missions <a href="http://dl.dropboxusercontent.com/u/6920345/HC_tutorial/hc_tutorial.pdf" target="_blank">http://dl.dropboxusercontent.com/u/6...c_tutorial.pdf</a> . It all works - but the problem is, when I try to activate DAC triggers, nothing happens. I can start the zones activated - but not deactivated. I think it is the problem in the dac_zones.sqf line here (located at bottom of sqf)<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Quote:</div>
	<div class="bbcode_quote printable">
		<hr />
		
			//if HC is inactive - make triggers global<br />
if (!HCPresent) then {<br />
	_i = o;<br />
	for &quot;_i&quot; from 0 to ((count _createdTriggers) -1) do{<br />
		publicVariable format [&quot;%1&quot; ,(_createdTriggers select _i)];<br />
	};<br />
};
			
		<hr />
	</div>
</div>Can someone with scripting knowledge check this? Thanks!</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>Burdy</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157098-Getting-HC-to-activate-DAC-triggers</guid>
		</item>
		<item>
			<title>Making Civilians hostile UNDER CERTAIN SITUATIONS.....</title>
			<link>http://forums.bistudio.com/showthread.php?157092-Making-Civilians-hostile-UNDER-CERTAIN-SITUATIONS&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 23:41:06 GMT</pubDate>
			<description><![CDATA[First I'd like to say hello!  It took me a while to make an account....damn internet explorer sucks....kept saying...cookies not enabled omggg haha...]]></description>
			<content:encoded><![CDATA[<div>First I'd like to say hello!  It took me a while to make an account....damn internet explorer sucks....kept saying...cookies not enabled omggg haha anyway....<br />
<br />
I'm new at this but I'm already in over my head.<br />
<br />
I know that adding (this addRating -10000;) will make civilians hostile but I'm looking to do much more than this....<br />
<br />
Here's a list of the conditions and what I'm trying to accomplish <br />
<br />
     -In mission have all 4 sides (op-for ect.) set against each other, including independents<br />
     -Civs will be friendly until picking up a weapon or exiting a certain area <br />
     -Civs will be grouped &quot;have a leader&quot; forget what its called haha<br />
     -Civs will be friendly to each other....or at least the ones in the same group<br />
     -opfor will be guarding the area the civs are held in (done)<br />
     -either by running, picking up a weapon or leaving the area op-for and others will engage the civs and always fire on them after that point<br />
<br />
Iv messed around with the this addRating -10000;...using different numbers and setting the op-for to hold fire....it worked for a bit....opfor would just hold their gun up...only shoot if shot(sometimes worked)...but when i increased the number of AI on both sides all hell broke loose. It also seems to work different depending on what op units i choose.  Anyway, i realized that this addRating -2000;  is basically the same as using 10000....and isn't going to work for me at all.  <br />
<br />
If someone can point me in the right direction that be great...<br />
From what I've read on here messing with the civs hostility can make the game really buggy but even if what I'm trying to do isn't possible...maybe you can tell me what is?<br />
<br />
BTW...the whole idea behind this is that the civs will be playing a jail break type game during an on going 3 way battle on Utes island. haha<br />
<br />
Thanks!<font color="Silver"><br />
<br />
<font size="1">---------- Post added at 23:41 ---------- Previous post was at 22:20 ----------</font><br />
<br />
</font>Just an update:<br />
<br />
Im experimenting with these but they dont seem to be working?  I'm confused if they should be on the civs init. or the opfor as well <br />
I've set the civ as captive by using setCaptive as well as having the (this addrating) at the same time.<br />
<br />
soldier1 addEventHandler [&quot;fired&quot;,{(_this select 0) setCaptive false}] - should make him no longer be captive after firing a shot thus defaulting him back to the add rating of 10000<br />
<br />
soldier1 spawn {waitUntil {!isNil primaryWeapon this};this setCaptive false} -  should make him no longer captive after picking up a primary weapon</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>dannyd488</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157092-Making-Civilians-hostile-UNDER-CERTAIN-SITUATIONS</guid>
		</item>
		<item>
			<title>Editing UI</title>
			<link>http://forums.bistudio.com/showthread.php?157089-Editing-UI&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 21:07:14 GMT</pubDate>
			<description>Is there any good tutorials out there about editing UI? What programs I need for layout? For example, I want to change a gear menu layout and also...</description>
			<content:encoded><![CDATA[<div>Is there any good tutorials out there about editing UI? What programs I need for layout? For example, I want to change a gear menu layout and also remove distance from the waypoints (which requires editing UI afaik).</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>kaski</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157089-Editing-UI</guid>
		</item>
		<item>
			<title>getting unit name in script</title>
			<link>http://forums.bistudio.com/showthread.php?157067-getting-unit-name-in-script&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 13:53:04 GMT</pubDate>
			<description>Hi, I am wondering if it is possible to get the name of a unit within a script. I suppose getVariable might do the trick, but I do not know the...</description>
			<content:encoded><![CDATA[<div>Hi, I am wondering if it is possible to get the name of a unit within a script. I suppose getVariable might do the trick, but I do not know the &quot;default&quot; variable list every object has. Could someone perhaps point out such a list?<br />
<br />
I am modifying the Xeno domination a bit, and I want to modify the x_helirespawn script a bit. I want some choppers (lift, wrecklift) to respawn pretty much instantly and others to respawn after 10 minutes. So I want to make a switch based on the unit name.</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>Casso</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157067-getting-unit-name-in-script</guid>
		</item>
		<item>
			<title>loadscreen too big - how to set correct properties?</title>
			<link>http://forums.bistudio.com/showthread.php?157063-loadscreen-too-big-how-to-set-correct-properties&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 13:21:44 GMT</pubDate>
			<description><![CDATA[Hello. I defined loadscreen in description.ext. loadscreen = "rad.paa"; but there is a problem. No matter how big it is - 256x256, 512x512, 1024x512,...]]></description>
			<content:encoded><![CDATA[<div>Hello. I defined loadscreen in description.ext. loadscreen = &quot;rad.paa&quot;; but there is a problem. No matter how big it is - 256x256, 512x512, 1024x512, 1024x512 or more... it's always very big by loading. Is there some way to set properties for it? Like width and height? I want that it will be small in the middle of the screen :confused:</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>JTS_2009</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157063-loadscreen-too-big-how-to-set-correct-properties</guid>
		</item>
		<item>
			<title>Disable select fire/Force fire mode?</title>
			<link>http://forums.bistudio.com/showthread.php?157043-Disable-select-fire-Force-fire-mode&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 06:50:17 GMT</pubDate>
			<description><![CDATA[I'm trying to lock certain weapons to single shot only, and prevent any kind of burst or full auto fire. This would include the player's weapon. I...]]></description>
			<content:encoded><![CDATA[<div>I'm trying to lock certain weapons to single shot only, and prevent any kind of burst or full auto fire. This would include the player's weapon. I searched for about an hour to no avail, so any help will be greatly appreciated.</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>mandaloin</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157043-Disable-select-fire-Force-fire-mode</guid>
		</item>
		<item>
			<title><![CDATA[Function isn't sleeping?]]></title>
			<link>http://forums.bistudio.com/showthread.php?157042-Function-isn-t-sleeping&amp;goto=newpost</link>
			<pubDate>Tue, 18 Jun 2013 06:43:54 GMT</pubDate>
			<description><![CDATA[Any idea why my script doesn't sleep for the 7 seconds it's suppose to? 
 
 
Code: 
--------- 
da_name_of_me = name player; 
serialkiller = true; 
...]]></description>
			<content:encoded><![CDATA[<div>Any idea why my script doesn't sleep for the 7 seconds it's suppose to?<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">da_name_of_me = name player;<br />
serialkiller = true;<br />
<br />
player addEventHandler [&quot;Fired&quot;, {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if(serialkiller) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [] call change_name;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
}];<br />
<br />
change_back = {<br />
&nbsp; &nbsp; &nbsp; &nbsp; hint &quot;John Doe&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; player setIdentity &quot;John&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; sleep 7;<br />
&nbsp; &nbsp; &nbsp; &nbsp; player setIdentity da_name_of_me;<br />
&nbsp; &nbsp; &nbsp; &nbsp; hint format[&quot;%1&quot;, da_name_of_me];<br />
};<br />
<br />
if(!serialkiller) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; player removeEventHandler [&quot;Fired&quot;, 0];<br />
};</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>SRBuckey5266</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157042-Function-isn-t-sleeping</guid>
		</item>
		<item>
			<title>pay for refueling</title>
			<link>http://forums.bistudio.com/showthread.php?157023-pay-for-refueling&amp;goto=newpost</link>
			<pubDate>Mon, 17 Jun 2013 19:53:58 GMT</pubDate>
			<description><![CDATA[Hi, 
 
Currently I'm spawning vehicles using this code: 
 
Code: 
--------- 
_mycar = "SUV_UN_EP1" createvehicle (position player); 
--------- 
I...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
Currently I'm spawning vehicles using this code:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">_mycar = &quot;SUV_UN_EP1&quot; createvehicle (position player);</code><hr />
</div>I also add this to my init.sqf<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">mymoney = 0</code><hr />
</div>Now I have been trying various things to deduct money whenever I repair or refuel a vehicle using this code<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">mymoney = mymoney - 10</code><hr />
</div>I cant seem to find a solution, is there an easy way to pay for fuel or repairs?<br />
<br />
Thx</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>dematti</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157023-pay-for-refueling</guid>
		</item>
		<item>
			<title>Getting the REAL base M4A1 model</title>
			<link>http://forums.bistudio.com/showthread.php?157017-Getting-the-REAL-base-M4A1-model&amp;goto=newpost</link>
			<pubDate>Mon, 17 Jun 2013 19:33:31 GMT</pubDate>
			<description>Was working on the loadouts for my units in the editor when I came across this (to me) annoying problem with the M4A1.  
When I give a soldier the...</description>
			<content:encoded><![CDATA[<div>Was working on the loadouts for my units in the editor when I came across this (to me) annoying problem with the M4A1. <br />
When I give a soldier the base model of the rifle without any optics using the line: this addWeapon &quot;M4A1&quot;; I get the version with a laser designator attached to it.<br />
However the U.S pilots from Operation Arrowhead use a &quot;clean&quot; version of the rifle without any attachments.<br />
Been looking at both the new and the old weapon lists but it seems like they all just refer to it as &quot;M4A1&quot; and I can't find anyone mentioning it on the forums so I am wondering if anyone knows how to get a hold of the models the pilots use?<br />
<br />
Created my account just to ask this question so yeah... that's how much these little things bothers me.</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>ReZource</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157017-Getting-the-REAL-base-M4A1-model</guid>
		</item>
		<item>
			<title>scripting help</title>
			<link>http://forums.bistudio.com/showthread.php?157011-scripting-help&amp;goto=newpost</link>
			<pubDate>Mon, 17 Jun 2013 18:58:33 GMT</pubDate>
			<description>so i have working on a script that allows a player to attach explosives to a wall/vehicle and the only problem is that the action menu for the and i...</description>
			<content:encoded><![CDATA[<div>so i have working on a script that allows a player to attach explosives to a wall/vehicle and the only problem is that the action menu for the and i am sure its not the only problem IEDs don't work here is the script <br />
btw the folder layout is as follows<br />
<br />
<b>mission folder&gt;</b><br />
     init.sqf <br />
     attach_explosives<br />
     <b>placement_func&gt;</b><br />
          action_c4<br />
          attach_c4<br />
          fnc_get_angle<br />
<br />
<b><u>init.sqf</u></b><br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">nul = [] execVM &quot;attach_explosives.sqf&quot;;</code><hr />
</div><b><u>attach_explosives.sqf</u></b><br />
<small><b>Spoiler:</b></small><br />
<div style="border: 1px dashed gray; padding: 1px;"><div><button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none';" title="Click to show the spoiler.">show spoiler</button></div><div id="spoiler" style="display: none;"><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">if (isserver) then { <br />
<br />
<br />
};<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (isnil(&quot;fnc_action_c4&quot;)) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fnc_action_c4 = compile loadfile &quot;placement_func\action_c4.sqf&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _debug = 0;<br />
<br />
_unit = player;<br />
nearbuildlist = [];<br />
clearbuildlist = [];<br />
<br />
// make units detect c4 around them to interact with<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nul = [_unit] spawn fnc_action_c4;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nul = [_unit] spawn {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit = _this select 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while {alive _unit} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _pos = getposATL _unit;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buildlist = nearestobjects [_pos,[&quot;house&quot;],300];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nearbuildlist = nearestobjects [_pos,[&quot;house&quot;],75];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clearbuildlist = buildlist - nearbuildlist;&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sleep 20;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
sleep 1;</code><hr />
</div></div></div><br />
<br />
<b><u>action_c4</u></b><br />
<small><b>Spoiler:</b></small><br />
<div style="border: 1px dashed gray; padding: 1px;"><div><button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none';" title="Click to show the spoiler.">show spoiler</button></div><div id="spoiler" style="display: none;"><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private ['_unit'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit = _this select 0;<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while {alive _unit} do {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _proximity = (getposATL _unit) nearobjects [&quot;all&quot;,3];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;ACE_c4&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach C4&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;ACE_c4_m&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach C4&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;ACE_DM12B1_M&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach C4&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;ACE_Pipebomb&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach Satchel&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;BAF_ied_v1&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;BAF_ied_v2&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;BAF_ied_v3&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;BAF_ied_v4&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;PMC_ied_v1&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;PMC_ied_v2&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;PMC_ied_v3&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_x iskindof &quot;PMC_ied_v4&quot;) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4 = _proximity select (_proximity find _x);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _idact = _unit addaction [&quot;Attach IED&quot;,&quot;placement_func\attach_c4.sqf&quot;,[_unit,_c4]];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; waituntil {(_unit distance _c4) &gt; 3};<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit removeaction _idact;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } foreach _proximity;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sleep 0.5;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };</code><hr />
</div></div></div><br />
<br />
<b><u>attach_c4</u></b><br />
<small><b>Spoiler:</b></small><br />
<div style="border: 1px dashed gray; padding: 1px;"><div><button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none';" title="Click to show the spoiler.">show spoiler</button></div><div id="spoiler" style="display: none;"><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">_args = _this select 3;<br />
_unit&nbsp; = _args select 0;<br />
_item = _args select 1;<br />
_dist = 3;<br />
_array = [];<br />
<br />
_upos = getposATL _unit;<br />
_eyes = eyepos _unit;<br />
_angle = (getdir _unit);<br />
_zdif = ((_eyes select 2) - (_upos select 2));<br />
<br />
if (isnil(&quot;fnc_get_angle&quot;)) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; fnc_get_angle = compile loadfile &quot;placement_func\fnc_get_angle.sqf&quot;<br />
<br />
};<br />
<br />
if (isnil(&quot;fnc_intersects&quot;)) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; fnc_intersects = compile &quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; private ['_unit','_pos','_angle','_front'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _unit = _this select 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _pos = _this select 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _checkdist = _this select 2;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _angle = _this select 3;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _hyp = _checkdist;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _adj = _hyp * (cos _angle);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _opp = sqrt ((_hyp*_hyp) - (_adj * _adj));<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _front = if ((_angle) &gt;=&nbsp; 180) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [(_pos select 0) - _opp,(_pos select 1) + _adj,(_pos select 2)]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [(_pos select 0) + _opp,(_pos select 1) + _adj,(_pos select 2)]<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _object = (lineintersectswith [_pos,_front,_unit]) select 0;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _obstructed = if (isnil('_object')) then {false} else {true};<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_obstructed,_front,_object]&quot;;<br />
<br />
};<br />
<br />
_array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
_obstructed = _array select 0;<br />
_obstruction = _array select 2;<br />
<br />
if (!(_obstructed)) exitwith {<br />
&nbsp; &nbsp; &nbsp; &nbsp; nul = [] spawn {hintsilent &quot;Move closer to the wall&quot;; sleep 5 ;hintsilent &quot;&quot;;};<br />
};<br />
<br />
while {_obstructed} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _dist = _dist - 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _obstructed = _array select 0;<br />
<br />
};<br />
<br />
_infront = _array select 1;<br />
<br />
while {!(_obstructed)} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _dist = _dist + 0.1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _obstructed = _array select 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
};<br />
<br />
while {_obstructed} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _dist = _dist - 0.01;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _obstructed = _array select 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
};<br />
<br />
_infront = _array select 1;<br />
_infront set [2,(_infront select 2) - _zdif];<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
_angle = _angle + 2;<br />
_dist = 3;<br />
<br />
_angle = if (_angle &gt; 360) then {_angle - 360} else {_angle};<br />
<br />
_array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
_obstructed = _array select 0;<br />
_obstruction = _array select 2;<br />
<br />
if (!(_obstructed)) exitwith {<br />
&nbsp; &nbsp; &nbsp; &nbsp; nul = [] spawn {hintsilent &quot;Move closer to the wall&quot;; sleep 5 ;hintsilent &quot;&quot;;};<br />
};<br />
<br />
<br />
while {_obstructed} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _dist = _dist - 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _obstructed = _array select 0;<br />
<br />
};<br />
<br />
_infront2 = _array select 1;<br />
<br />
while {!(_obstructed)} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _dist = _dist + 0.1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _obstructed = _array select 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
};<br />
<br />
while {_obstructed} do {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; _dist = _dist - 0.01;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _array = [_unit,_eyes,_dist,_angle] call fnc_intersects;<br />
&nbsp; &nbsp; &nbsp; &nbsp; _obstructed = _array select 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
};<br />
<br />
_infront2 = _array select 1;<br />
_infront2 set [2,(_infront2 select 2) - _zdif];<br />
<br />
_bdir = getdir _obstruction;<br />
_sdir = [_infront,_infront2] call fnc_get_angle;<br />
<br />
_dirdiff = _bdir - _sdir;<br />
if (_dirdiff &lt; 0) then {_dirdiff = _dirdiff + 360};<br />
<br />
if ((_item iskindof &quot;ACE_c4&quot;) or (_item iskindof &quot;ACE_c4_m&quot;) or (_item iskindof &quot;ACE_DM12B1_M&quot;)) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setvectordir _vdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,0,270] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if ((_item iskindof &quot;ACE_Pipebomb&quot;) or (_item iskindof &quot;Pipebomb&quot;)) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,90] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if (_item iskindof &quot;BAF_ied_v1&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setvectordir _vdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,0,270] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if ((_item iskindof &quot;PMC_ied_v1&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,90] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if (_item iskindof &quot;BAF_ied_v2&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setvectordir _vdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,0,270] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if ((_item iskindof &quot;BAF_ied_v4&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,90] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
if (_item iskindof &quot;BAF_ied_v3&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setvectordir _vdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,0,270] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if ((_item iskindof &quot;PMC_ied_v2&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,90] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
if (_item iskindof &quot;PMC_ied_v3&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,0] call fnc_setpitchbank;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setvectordir _vdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,0,270] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};<br />
<br />
if ((_item iskindof &quot;PMC_ied_v4&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (_obstruction iskindof &quot;LandVehicle&quot;) then {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _cardimentions = boundingbox _obstruction;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _carheight = ((_cardimentions select 1) select 2) - ((_cardimentions select 0) select 2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _c4height = if (_carheight &gt;= 4) then {1.2} else {0.7};&nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + _c4height)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _vdir = vectordir _item;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _wtmpos = _obstruction worldtomodel (getposATL _item);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item attachto [_obstruction,_wtmpos];<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [_item,90,90] call fnc_setpitchbank;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setpos [(_infront select 0),(_infront select 1),((_upos select 2) + 1.2)];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _item setdir _sdir;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
};</code><hr />
</div></div></div><br />
<br />
<b><u>fnc_get_angle</u></b><br />
<small><b>Spoiler:</b></small><br />
<div style="border: 1px dashed gray; padding: 1px;"><div><button type="button" class="button" onclick="this.parentNode.parentNode.childNodes[1].style.display = ''; this.parentNode.style.display = 'none';" title="Click to show the spoiler.">show spoiler</button></div><div id="spoiler" style="display: none;"><div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">_obj1 = _this select 0;<br />
_obj2 = _this select 1;<br />
<br />
_pos1 = if ((typename _obj1) == &quot;Array&quot;) then {_obj1} else {getposATL _obj1};<br />
_pos2 = if ((typename _obj2) == &quot;Array&quot;) then {_obj2} else {getposATL _obj2};<br />
<br />
<br />
_hyp = _pos1 distance _pos2;<br />
if (_hyp == 0) then {_hyp = 0.1};<br />
_adj = (_pos1 select 1) - (_pos2 select 1);<br />
<br />
<br />
<br />
_angle = if ((_pos1 select 0) &gt; (_pos2 select 0)) then {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; acos (_adj/_hyp);<br />
<br />
} else {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 360 - (acos (_adj/_hyp));<br />
<br />
};<br />
<br />
_angle</code><hr />
</div></div></div><br />
<br />
thanks for your help!!</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>TrevorMcNeill</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?157011-scripting-help</guid>
		</item>
		<item>
			<title><![CDATA[Can't Select Units in MP]]></title>
			<link>http://forums.bistudio.com/showthread.php?156995-Can-t-Select-Units-in-MP&amp;goto=newpost</link>
			<pubDate>Mon, 17 Jun 2013 15:16:04 GMT</pubDate>
			<description>I just made a mission giving the player access to three F35s, three AH64s, and three MH60s. There are forty-two foot soldiers who start out inside...</description>
			<content:encoded><![CDATA[<div>I just made a mission giving the player access to three F35s, three AH64s, and three MH60s. There are forty-two foot soldiers who start out inside the transport choppers, a platoon leader, sergeant, and medic, and pilots for all of the aircraft. Everyone starts on the LHD southwest of Utes. Anyway, in multiplayer I can play as everyone except for the first and second squad members. They are all set as 'Playable' and there are no differences in their settings than the third squad members that I can choose. The total number of units I can select in the lobby are 34.<br />
<br />
Any ideas?</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>GReeves</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?156995-Can-t-Select-Units-in-MP</guid>
		</item>
		<item>
			<title>Opfor attack each other on spawn</title>
			<link>http://forums.bistudio.com/showthread.php?156980-Opfor-attack-each-other-on-spawn&amp;goto=newpost</link>
			<pubDate>Mon, 17 Jun 2013 05:49:53 GMT</pubDate>
			<description><![CDATA[I have made a small script that spawns OPFOR technicals at a marker using the "addAction" command. This works fine and dandy, but when I spawn more...]]></description>
			<content:encoded><![CDATA[<div>I have made a small script that spawns OPFOR technicals at a marker using the &quot;addAction&quot; command. This works fine and dandy, but when I spawn more than one at a time, they just attack each other, killing gunners and drivers before they even get to their destination. I think that when I spawn them in quick succession, they damage each other, causing them to attack each other. I want my end result to have the entire OPFOR side friendly to each other, even if they accidentally damage each other.<br />
<br />
Here is the code for where I think the problem is:<br />
(I know these are not a lot of lines in each file, but I just getting into C)<br />
<br />
closeman3.sqf<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">_grp = createGroup east;<br />
_dir = random 359;<br />
_pos5 = [(getMarkerPos &quot;closeV&quot; select 0)-10*sin(_dir),(getMarkerPos &quot;closeV&quot; select 1)-10*cos(_dir)];<br />
_posHome = getMarkerPos &quot;my_airport&quot;;<br />
<br />
_veh = [_pos5, 270, &quot;Pickup_PK_GUE&quot;, _grp] call BIS_fnc_spawnVehicle;<br />
_veh doMove _posHome;</code><hr />
</div>closeman3.sqf is initiated by this line of a different file:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">dangerclose addAction [&quot;Spawn - Marauding Technical&quot;,&quot;badguys\closemen3.sqf&quot;];</code><hr />
</div>Note that I have about 10 .sqfs that look very similar to this.</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>Scouter</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?156980-Opfor-attack-each-other-on-spawn</guid>
		</item>
		<item>
			<title>Pos.sqs error</title>
			<link>http://forums.bistudio.com/showthread.php?156969-Pos-sqs-error&amp;goto=newpost</link>
			<pubDate>Sun, 16 Jun 2013 23:27:03 GMT</pubDate>
			<description><![CDATA[So im trying to use pos.sqs do get the world spawn location of my taxiways on my map. How ever when i spawn a jeep or something and put []exec...]]></description>
			<content:encoded><![CDATA[<div>So im trying to use pos.sqs do get the world spawn location of my taxiways on my map. How ever when i spawn a jeep or something and put []exec “Pos.sqs” into the init field, and the pos.sqs is in my mission folder, i get an error &quot;invalid number in expression&quot; Now mission editing really isn't my thing, so im pretty sure its something silly, if anyone can let me know how/why i would be much appreciative, thanks!</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>Kroni</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?156969-Pos-sqs-error</guid>
		</item>
		<item>
			<title><![CDATA[How to stop a script while it's running  and delete all components?]]></title>
			<link>http://forums.bistudio.com/showthread.php?156945-How-to-stop-a-script-while-it-s-running-and-delete-all-components&amp;goto=newpost</link>
			<pubDate>Sun, 16 Jun 2013 19:39:17 GMT</pubDate>
			<description><![CDATA[I feel like I'm missing something easy, but I want to be able to stop a script mid-way and delete all the components created in the script in the...]]></description>
			<content:encoded><![CDATA[<div>I feel like I'm missing something easy, but I want to be able to stop a script mid-way and <i>delete all the components created in the script</i> in the case of a certain event.<br />
<br />
As an example, I'm running a mission in which I can call for a helicopter extract (kylania's plannedExtraction.sqf) via a radio command. If the helicopter crashes or I change my mind, I want to be able to cancel the script. <br />
<br />
I can stop the script by creating a radio trigger to cancel the extraction and placing <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"> (cancelExtraction = true;)</code><hr />
</div> in the On activation field and then calling the plannedExtraction script with this:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">extractionScript = [player] execVM &quot;plannedExtraction.sqf&quot;;<br />
waitUntil ((scriptDone extractionScript) || (cancelExtraction));<br />
If (cancelExtraction) then {terminate extractionScript};</code><hr />
</div>but I can't delete all the script components (like waypoints, markers, and the extraction helicopter and crew) from outside the script because they are local variables. If I made them all global variables I could then delete them all individually outside the script, but I feel there must be an easier way - and I wouldn't be able to do that for a script I am calling from multiple sources and therefore needs to have local variables.<br />
<br />
Alternatively, I could alter the plannedExtraction.sqf with:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">while !(cancelExtraction) do <br />
{ ... all the plannedExtraction code...};<br />
delete waypoints, markers, etc.</code><hr />
</div>but I think the script won't terminate until it completes it's cycle.<br />
<br />
This has to be a common issue people deal with, but I can't find an answer. Any ideas?</div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>nephros</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?156945-How-to-stop-a-script-while-it-s-running-and-delete-all-components</guid>
		</item>
		<item>
			<title>Run script serverside and broadcast array to clients</title>
			<link>http://forums.bistudio.com/showthread.php?156926-Run-script-serverside-and-broadcast-array-to-clients&amp;goto=newpost</link>
			<pubDate>Sun, 16 Jun 2013 13:24:35 GMT</pubDate>
			<description>Hello! 
 
I am trying to make my randomizer script function in multiplayer, but I have not yet been successful in doing so... I have tried make it...</description>
			<content:encoded><![CDATA[<div>Hello!<br />
<br />
I am trying to make my randomizer script function in multiplayer, but I have not yet been successful in doing so... I have tried make it work with publicVariable in both the init.sqf and the script itself. It works fine both in multiplayer and singleplayer when I am alone but when 2 or more players are present it doesn't work.<br />
<br />
I have also tried executing it in-game with the same method as in the init.sqf.<br />
<br />
So my question to you all is how I can successfully run this server-side and broadcast the updated array to the clients?<br />
<br />
Any help is greatly appreciated.<br />
<br />
Note: I haven't fully cleaned up the code of old stuff, so if you see something that isn't used... It's because of that. It might also include faults and/or ineffective ways of doing things, but I am still just a beginner. :P<br />
<br />
init.sqf:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">ranarr = [0, 0, 0, 0];<br />
publicVariable &quot;ranarr&quot;;<br />
<br />
<br />
if (isServer) then<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; ran = [2, 1] execVM &quot;randomizer_local.sqf&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; publicVariable &quot;ranarr&quot;;<br />
}</code><hr />
</div>This is the code itself:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">_times = _this select 0; // First parameter<br />
_val = _this select 1; // Second parameter<br />
_arrcount = count ranarr;<br />
_i = 0;<br />
_raninit = floor(random _arrcount); // one inital value to avoid nil value<br />
_tmp = []; // temporary array for random values<br />
_case = &quot;gen&quot;; // stage controller<br />
_con = 1; // loop variable<br />
_checktmp = [99];<br />
_checkcount = 1;<br />
// ranarr set [_raninit, _val];<br />
<br />
while {_con == 1} do<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; switch (_case) do<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case &quot;gen&quot;: // generate and check numbers for duplicates<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while {_i &lt; _times} do<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _ran = floor(random _arrcount); // select random value<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (_ran == _x) then<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while {_ran == _x} do<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _ran = floor(random _arrcount);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } forEach _checktmp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _tmp set [_i, _ran];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _checktmp set [_checkcount, _ran];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _i = _i + 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _checkcount = _checkcount + 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _case = &quot;check&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case &quot;check&quot;:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ranarr set [_x, _val];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } forEach _tmp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; publicVariable &quot;ranarr&quot;; // Broadcast updated array to clients.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _con = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
};</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://forums.bistudio.com/forumdisplay.php?93-ARMA-2-amp-OA-MISSIONS-Editing-amp-Scripting"><![CDATA[ARMA 2 & OA : MISSIONS - Editing & Scripting]]></category>
			<dc:creator>PurpleDrain</dc:creator>
			<guid isPermaLink="true">http://forums.bistudio.com/showthread.php?156926-Run-script-serverside-and-broadcast-array-to-clients</guid>
		</item>
	</channel>
</rss>
