| 02-02-2003, 07:20 PM | #1 |
Guest | I'm trying to create (or find) a function that will let me look up (or create) a unique integer of a specific unit. What I'm trying to do is create a variable array that uses this unique unit integer as it's index. That way, I can look up that variable for that unit in any trigger. If could find or convert in string format, then I could rig up my own parse function using the substringBJ function. That blasted UnitID thing only references Unit-Type (i.e. footman) though. Ugh. Been wracking my peabrain on this for hours and hours... Finally decided that this is basic enough that someone else must have come up with a way... Thanks in advance... |
| 02-03-2003, 11:15 AM | #2 |
I think the only way to that is to use an integer array and a unit array parallel as a kind of list. But of course that has linear complexity for accessing it. BTW, even for unit types that is not simple since the unit type ids are very large numbers and for an array you need very small numbers. |
| 02-03-2003, 06:17 PM | #3 |
Guest | Thanks for the tip Andy. I got it to work. I just posted it over in the trigger depository here: http://www.wc3campaigns.com/forums/s...threadid=11158 |
