| 03-10-2003, 02:58 AM | #1 |
Is there a way of enumerating through items in the same manner as you enumerate through units using a unitgroup. |
| 03-10-2003, 03:23 AM | #2 |
Basicly hes saying is their anyway to pick all items then do things to them? |
| 03-10-2003, 03:42 AM | #3 |
I remember their being functions for this in blizzard.j, but they were commented out. Maybe try copy and pasting them into custom text in your map uncommented and then using them? |
| 03-10-2003, 05:05 AM | #4 |
You could create an array of item objects and move through that using - for a from (start) to (end) of array to do this - create an item variable and click the array box. You can then access this using the basic array commands - adding and removing elements as you want.. I think there is an array tutorial in the tutorials section. To enumerate through, you can just keep track of the current index in a variable. |
| 03-10-2003, 03:09 PM | #5 |
sheepofdoom: Thats an alright idea, but not what I want. What I need to be able to do is enumerate through the list of items dynamically, without having to manually put each item into the integer or item array. dataangel: I looked through the blizzard.j file, and the only function I found commented out, that had to do with items was dealing with special effects. |
| 03-10-2003, 05:48 PM | #6 |
Guest | Ya know, in another thread Mythmon and I were trying to figure out what Player 16 was... I came to the conclusion that it must be the "items" player. Seems to make sense since it's on the drop-down list of players, so... So, to grab all the items on the map, why don't you try this for a Unit-Group: (All units owned by Player(16)) I think that would work. |
| 03-10-2003, 05:54 PM | #7 |
Items aren't units though. A function that takes units cannot take items as parameter you would need a function that takes widgets in order to be able to enum both items and units |
