Jump to content

Sign in to follow this  
scottb613

[magazines] - Gross Conceptual Error?

Recommended Posts

Hi Folks,

 

Spinning my wheels on this one - [magazines] works fine on the player - however - [magazines] doesn't work on the Players AI Group Members? I've tried everything I can think of. I gave the AI Units Variable Names - I also tried the default names returned from a [units player] command - nothing seems to provide me with the magazines of the AI units - it returns null. The [magazines player] works absolutely fine. What am I missing?

 

//U2-U6 Variable Names assigned to AI Player Group Members.

private _units = [U2,U3,U4,U5,U6];
//private _units = units player;

private _mags = magazines player;

_logger = format ["PLAYER || %1", _mags];
hint _logger;
sleep 5;

{
	private _mags = magazines _x;
	
	_logger = format ["%1 || %2", _x, _mags];
	hint _logger;
	sleep 5;
} foreach _units;
hint "";

 

Thanks.

 

Regards,
Scott

Share this post


Link to post
Share on other sites

For me the script works fine. I don't really think this is what causes your problem, but magazines <unit> does not return the current loaded mag of a AI unit. So, if the AI just have the loaded mag and nothing else, you get "U2 || ", "U3 || ", ... 

  • Like 1

Share this post


Link to post
Share on other sites
  On 9/15/2022 at 1:13 AM, ThomasRW said:

For me the script works fine. I don't really think this is what causes your problem, but magazines <unit> does not return the current loaded mag of a AI unit. So, if the AI just have the loaded mag and nothing else, you get "U2 || ", "U3 || ", ... 

 

Hi Thomas,

 

Thanks so much.

 

Bingo.

 

Bad test units. I had units where I used the ACE Arsenal to empty all containers via the "trashcan" icon for my testing - - - however - - - I knew they didn't have magazines - so I went back into ACE Arsenal and added magazines. Apparently - this doesn't work and these units appear broken. After your feedback - I added a fresh unit to my test - untouched by the ACE Arsenal - works like a champ. Spent hours on this issue. A fresh set of eyes is always helpful - much appreciated.

 

Regards,
Scott

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  

×