Jump to content
Sign in to follow this  
unnamedplayer27

Reveal for ACM units

Recommended Posts

I want groups and units spawned by the Ambient Combat Manager to have revealed the location of a unit (Which in my case is the player) automatically. The purpose being to make randomly generated combat more immersive by not always being the one who fires the first shot. How use the reveal function on ACM spawned units? If it were possible to do the same with doMove on a unit's location, this would also be useful, but not necessary.

https://community.bistudio.com/wiki/reveal

https://community.bistudio.com/wiki/doMove

Thank you in advance

Share this post


Link to post
Share on other sites

ACM = ACM module.

Target = unit to be revealed.

Not tested, but should give you the idea what to look for and get you started.  In Init.sqf:

if (Local ACM) then 
{
	niv = [ACM,Target] spawn 
	{
		_acm = _this select 0;
		_target = _this select 1;

		waitUntil {!isNil {_acm getVariable "initDone"}};
		waitUntil {_acm getVariable "initDone"};

		while {!isNull _acm} do 
		{
			sleep 3;
			_scopes = +(_acm getVariable "patrolScopes");
			if (count _scopes > 0) then 
			{
				{
					_scope = _x;
					_grps = +(_scope getVariable "groups");
					if (!isNil "_grps") then 
					{
						_grps = _grps - [grpNull];
						if (count _grps > 0) then 
						{
							{_x Reveal _target;} forEach _grps;
						};
					};
				} forEach _scopes;
			};
		};
	};
};

 

Share this post


Link to post
Share on other sites

@opusfmspol Thanks, it does give me an idea of where to start, though scripting in general is still basically Chinese to me. I've been modifying my ACM via a trigger, but now I'll change those variables in the Init.SQF. Once I learn a little more about modifying the specific details of the ACM groups, it should be easy enough. I've got to just sit down and learn the basics when I have the time, Arma 3 is mostly the same language right? If so it will be worth my time to learn, as I plan to work with that when I get a better system.

Share this post


Link to post
Share on other sites
5 hours ago, unnamedplayer27 said:

Arma 3 is mostly the same language right?

Yep, it's the same, but has lots more commands & functions (and  modules, A3 calls them systems) to reduce scripting needs or problems, and much better scripting for multiplayer.

 

And much better resources & documentation available now than when A2/OA was on top, to help addon / mission makers learn.  IMHO, not enough credit is given for that big improvement.

 

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  

×