well, you also have to save the names as string in an array.
so filtering is basically delete all items from the list and repopulate it with items which contain the entered string. but now you have to rematch the index of dialog item to the right index of unit type. therefore you need another array of ints which save the index of the original entry.
example:
lets say you have 10 units, your filter selects unit 3 and 8. your int array MatchInt[1] = 3, MatchInt[2] = 8;
there is a function to return the selected index of a listbox for player. you now have two choices, either you create a variable array of type unit type. for example: var units[1] = Marine; add list item "Marine" to dialog item.
on button use you create unit of type units[selected index of dialog item]
other way would be to use user data tables and match index with index of dialog item.
the counter is a variable of type integer, also an array for each player.
ok, fully working version
i have to go now, here is something to work with. might update later
well, you also have to save the names as string in an array.
so filtering is basically delete all items from the list and repopulate it with items which contain the entered string. but now you have to rematch the index of dialog item to the right index of unit type. therefore you need another array of ints which save the index of the original entry.
example:
lets say you have 10 units, your filter selects unit 3 and 8. your int array MatchInt[1] = 3, MatchInt[2] = 8;
there is a function to return the selected index of a listbox for player. you now have two choices, either you create a variable array of type unit type. for example: var units[1] = Marine; add list item "Marine" to dialog item.
on button use you create unit of type units[selected index of dialog item]
other way would be to use user data tables and match index with index of dialog item.
the counter is a variable of type integer, also an array for each player.