| 09-13-2002, 05:34 PM | #1 |
On a custom map I want a certain type of Unit to be replaced by another type, if the first one is killed (kinda Alien Chestburster e.g.). THAT is not the problem, BUT who can I "add the new Unit" to the old units Unit Group ??? I know how to add units to a certain unit group (all my unit groups are in arrays btw) but how can I extract the old units UnitGroup Indexnumber and tell it to the Trigger that should add the new unit to the old units UnitGroup ??? I´m tired of smashing my head on the table... thx |
| 09-14-2002, 04:41 AM | #2 |
Guest | u probably need a loop to see if the killed unit is in unitgroup[loopa] etc... |
| 09-14-2002, 09:08 PM | #3 |
Guest | It really depends on how you have the array setup. You will need to have it setup in a way you can access it by using units. Is the array per player? You can try "Player Number(Owner of Unit(Dying Unit))" in that case. Edited later: With more thought I think you may be able to check every single Unit Group you have and use an If...Else statement with a boolean check "Unit is in Unit Group" for the "Dying Unit". Then if the Dying Unit is in that Unit Group (and it should be, since its "Dying" and not "Dead" yet), you can place the newly created unit in there... But there must be a better way then that. |
