HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Order of Units in Group

11-29-2006, 10:29 AM#1
Jazradel
Can anyone tell me how the order of units in a group is assigned?
11-29-2006, 02:59 PM#2
The)TideHunter(
Probally just the first it finds is the first it lables.
The first unit it picks up would be labled 1, second 2, etc.
When a unit is removed from the group, all ranks above it move down one to keep order.
11-29-2006, 03:47 PM#3
shadow1500
There's a field in the Object Editor for unit ranks when a group is selected.
11-29-2006, 09:21 PM#4
Jazradel
I ran some tests, The)Tidehunter) and I'm fairly sure it's not that.

And shadow1500, which field is this?
11-29-2006, 09:32 PM#5
shadow1500
I didn't have access to the World Editor the time I wrote my post. The field is "Stats - Formation Rank".
11-29-2006, 10:13 PM#6
Jazradel
No way to change that in game, so:

How can I return a list of units?
11-30-2006, 12:17 AM#7
TaintedReality
Loop through the group and store them to an array. Have an integer variable starting at 0 and increasing by 1 each time a unit is picked, and then that integer variable will be the index when you set the array value to the picked unit.
11-30-2006, 12:22 AM#8
Jazradel
You can only return a single element of an array, not a whole array.
11-30-2006, 12:24 AM#9
TaintedReality
Oh damn, didn't really read the "return" part as I should have ; ). You have to return them as a group. Or you can store it to a global array, but if you want it all to be local you've gotta use groups. If you tell us what exactly you're trying to do we could probably come up with a workaround.
11-30-2006, 01:17 AM#10
Jazradel
I need a function to cycle through a group and return it in order based on several criteria (at the moment life/mana).
11-30-2006, 01:33 AM#11
PipeDream
Try Infrane's list system