Unit Groups and AI |
Submitted by Gideon on Sat, 2007-04-21 16:40.
SE:V MODs
I've been trying, and I have yet to discover how to have the AI look inside a unit group.
Has anyone here had any success? I want to count the number of units inside the unit group, but I can't seem to find a way to do it.
Thanks.

Re: Unit Groups and AI
Submitted by Captain Kwok on Wed, 2007-04-25 07:39.
Try identifying the space object as a unitgroup, then you might be able to cycle through the units as individual cargo items (Sys_Get_Space_Object_Cargo_Item_ID) which would give the the item ID that you could use to get the design ID etc.
-----

Re: Unit Groups and AI
Submitted by Captain Kwok on Thu, 2007-04-26 07:46.
I'm glad it worked out. I had used a variation on my suggestion to return the type of unitgroup in order to give it orders, but I hadn't had the opportunity to see if it actually worked as intended.
-----




Re: Unit Groups and AI
Sys_Get_Number_of_Units_In_Space_Sector
returns number of visible units in a specific system and sector.
returns a number count on a specific vehicle type(fighters or satellites etc. etc.) or if desired a number count of all units in sector.