- Joined
- Nov 13, 2006
- Messages
- 1,814
i want check units in unit group 1by1 without make a callback function like what forloop do because i want use 1 number from main function but also i dont want remove units because i will need later :/
so i give a example:
1st i create few hero i will tell later why i use them
when start the map i create a global unit group, where i put random x unit, during game play if a unit die then remove from group when spawn a new unit from this unit type then add to unit group.
(Notice: acctually i use this group for more unit type not only 1, so i cant use GroupEnumUnitsOfType)
during game every 3 sec i check every unit in unit group and lets say if that heroes what i created in begining attack 1 unit from group (each hero can attack only 1 unit from group in same time, so every hero have different target, also have restriction x hero type attack only v,y,z unit type from group)
ok i tell different way, unit group contain units (2 category: mine & herb), x hero type attack only mine units, another hero type attack only herb unit type
if possible i want use something like groupenumrange where dont need external function just a loop, also dont want many loop(so that also not solution make a loop for each unit type)
so i give a example:
1st i create few hero i will tell later why i use them
when start the map i create a global unit group, where i put random x unit, during game play if a unit die then remove from group when spawn a new unit from this unit type then add to unit group.
(Notice: acctually i use this group for more unit type not only 1, so i cant use GroupEnumUnitsOfType)
during game every 3 sec i check every unit in unit group and lets say if that heroes what i created in begining attack 1 unit from group (each hero can attack only 1 unit from group in same time, so every hero have different target, also have restriction x hero type attack only v,y,z unit type from group)
ok i tell different way, unit group contain units (2 category: mine & herb), x hero type attack only mine units, another hero type attack only herb unit type
if possible i want use something like groupenumrange where dont need external function just a loop, also dont want many loop(so that also not solution make a loop for each unit type)