I need help on a map i'm working on.
I want the game to automatically group lets say the last 3 created units.
The issue i got is, that i can only create group variables static and not dynamic.
The best thing would be if i could acces a group through the units in it.
maybe you have an idea how this could work. If you got further questions, just ask!
That'd be best to be made into a own function so you don't have to care about the counter increment.
If you want to get the unit group then you can do
SettempGroup=gUnitGroup[CustomValueof(myunit)]
This is rather basic, of course. But it does work.
I don't know how much you know about triggering, so if there's anything I've not explained well enough, just post it.
Hey guys!
I need help on a map i'm working on. I want the game to automatically group lets say the last 3 created units.
The issue i got is, that i can only create group variables static and not dynamic. The best thing would be if i could acces a group through the units in it.
maybe you have an idea how this could work. If you got further questions, just ask!
btw: dint found any related topic in search
pnx
You could construct an Indexing system to keep track of it.
You have a global array of unit groups ( gUnitGroup[x] )
And a global integer (gCounter = 0)
Then if you want to group units into a group you can do
That'd be best to be made into a own function so you don't have to care about the counter increment.
If you want to get the unit group then you can do
This is rather basic, of course. But it does work.
I don't know how much you know about triggering, so if there's anything I've not explained well enough, just post it.
Hey
Thank you very much!
The only problem i got is, that i cant set the Custom Value of the Unit to the Integer.
Unit
the "0" can be set as any integer, but the 100.0 cant be replaced by an integer