Jump to content
Sign in to follow this  
alleycat

Check if unit is in area and select it

Recommended Posts

How to target things that are inside a trigger or marker?

So far I have this:

		{
		_in = [_m, _x] call bis_fnc_intrigger;
		diag_log text format ["%1 is in - %2", name _x , _in];
		{
			//do something with every unit inside of it
		} //what to put here?


	} foreach AllUnits;

The first part works. using the fnc_ to check what unit passes as inside. However when I want to apply something on the unit inside, I cant find the right syntax.

Share this post


Link to post
Share on other sites

Variable thisList contains array of units that are activating current trigger. You can pass it into script via activation field like this:

[thisList] execVM "someScript.sqf";

And then just select it in that script:

_activated_by_array = _this select 0;

Edited by Champ-1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×