Unit Groups and AI |
Soumis par Gideon le Sam, 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.
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Re: Unit Groups and AI
Soumis par Captain Kwok le Mer, 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.
-----
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Re: Unit Groups and AI
Soumis par Captain Kwok le Jeu, 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.
-----
» Vous devez vous identifier ou créer un compte pour écrire des commentaires




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.