Jump to content
Aurora152

Add all BLUFOR units to high command

Recommended Posts

Hello all,

 

Is there a way to add ALL BLUFOR units/groups that have been spawned via script or Zeus, when in-game, to a high command module?

I understand there is hcSetGroup but this is done individually per group. 

Is there a possibility of running it in a loop every few seconds to add new units?

 

I have been tinkering around with the expression input in the Spawn AI Module and have this:

player hcSetGroup [_this];

However, I am getting an error of it being an array instead of a group... 

I have tried:

_grp = _this; player hcSetGroup [_grp];

But get the same thing...

Any help would be much appreciated...

 

Thanks in advance. 🙂

Share this post


Link to post
Share on other sites

Never messed with the spawn module but i would throw a guess that the best way to do it is simply a repeatable trigger calling all groups for side west to be added to HC.

 

I use the show hide module to add groups as mission progresses and simply upon their "show" stage,add them to HC.

Share this post


Link to post
Share on other sites

@redarmy

 

I am not too sure how you would use the hide/show module linked to the HC module?

I have tried this:

while {true}  do    
{  
{   
HC1 hideObject true;   
HC1 hideObject false;  
sleep 1;  
};     
};  

(HC1 = High Command Module)

 

I've tried this also:

while {true}  do    
{  
{   
{player hcSetGroup [_x]} forEach units west;   
sleep 1;  
};     
}; 

Neither seem to work, unfortunately.

 

 

Share this post


Link to post
Share on other sites

try this script:

[] spawn
{

while { true } do
{

{
 _group = _x;

if(!(_group in (hcAllGroups player)) && side _group == west) then
{

 player hcSetGroup [_group];

};

} foreach allgroups;

 sleep 2;
};

};
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
23 minutes ago, gc8 said:

 


while { true } do
{

{
 _group = _x;


if(!(_group in (hcAllGroups player)) && side _group == west) then
{

 player hcSetGroup [_group ];

};



} foreach allgroups;


 sleep 2;
};

 

I'm getting a generic expression error from the sleep 2?

 

Edit: 

I have given this a go:

while { true } do
{
	{
		{
		_group = _x;
		if(!(_group in (hcAllGroups player)) && side _group == west) then
			{
			player hcSetGroup [_group ];
			};
		} foreach allgroups;
		Sleep 2;
	};
};

And its stopped the error. But it still doesn't work... 😞

 

Edited by Aurora152

Share this post


Link to post
Share on other sites
4 minutes ago, Aurora152 said:

I'm getting a generic expression error from the sleep 2?

 

where you running the script from? I added spawn to the script so it should be ok now

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Aurora152 said:

@gc8

 

Amazing! Working now! 

 

Thank you 🙂

Man one of the best feelings in Arma isnt even when your playing,its when u figure your way around an issue u had PREVENTING u from playing lol

  • Like 1
  • Haha 2

Share this post


Link to post
Share on other sites
On 1/7/2021 at 4:49 PM, Aurora152 said:

I have been tinkering around with the expression input in the Spawn AI Module and have this:


player hcSetGroup [_this];

However, I am getting an error of it being an array instead of a group... 

As the expression field of a SpawnAI Module is supplied an array of [ group, module, group data ] when it spawns AI, as can be seen by mousing over the expression field in the modules attributes in the editor.

player hcSetGroup [ _this select 0 ];

 

  • Like 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

×