OK, well, I'm making an MUI spell with hashtables, and I need to get a unit in a variable, and I also need to get its handle. The problem here is that the unit I am getting will be a random unit from a unit group, and if I use "Random Unit From Unit Group" for both of them, I could get different units.
So I figured I could make a unit variable, and then a handle variable which gets a unit handle from the unit variable. However, I couldn't manage to find a way to do this. I tried to do it the other way round (get unit from unit handle) but this wasn't possible either. The best I could find was loading a unit handle from a hashtable, but I don't want to make a hashtable just for this.
If someone could tell me if I've missed something, or an alternative method altogether, that'd be cool. Also if you need any elaboration then please say so.
So I figured I could make a unit variable, and then a handle variable which gets a unit handle from the unit variable. However, I couldn't manage to find a way to do this. I tried to do it the other way round (get unit from unit handle) but this wasn't possible either. The best I could find was loading a unit handle from a hashtable, but I don't want to make a hashtable just for this.
If someone could tell me if I've missed something, or an alternative method altogether, that'd be cool. Also if you need any elaboration then please say so.