| 01-21-2006, 02:30 AM | #1 |
How do i do Count all items of type? i cant seem to find it. |
| 01-21-2006, 02:49 AM | #2 |
where? inside a unit's inventory or in the whole map? |
| 01-21-2006, 02:54 AM | #3 |
Trigger: That's one way of doing it, not sure if it's the best though. |
| 01-21-2006, 05:20 AM | #4 |
Whole Map Including Unit Inventory |
| 01-21-2006, 11:09 AM | #5 |
why would you want to do that? And it is like this: Trigger: ![]() set count=0![]() -- next has a memory leak -- |
| 01-22-2006, 12:46 AM | #6 |
I guess to reduce memory leaks your better doing this way a item is created Add 1 to the itemcount You also need a custom trigger to detect when items are used. For this to work you need to change the properties of all you items to Perishable (NO) What happens is, lets say an item has 3 charges.. if you use up three charges the item will have 0 charges but remain in your inventory. A trigger then removes the item with 0 Charges from game and -1 from itemcount. I suggest first test whether or True permanent items like a ring of protections works properly A trigger that detects when an item is pawned. |
| 01-22-2006, 12:53 AM | #7 |
seems you are confusing memory leaks with process duration |
| 01-23-2006, 02:40 AM | #8 |
Following your insructions Vex it seems to work However it also caused alot of Compouding lag i use the On ground and in inventory Numbers as 2 differnt numbers and that seemed to Resolve that, wondering - over a long period(Guess i could just let the map run for a hour and see for my self) of time would the lag come back? Also lets say i have a bunch of Buildings Scatterd threwout the man. theres are units whos Position is Undeterminded and i need these units to walk to The closest one of these Buildings .(makeing a new thred for this) (thank you) |
| 01-23-2006, 12:44 PM | #9 |
Well it depends. Are you calling that a lot of times, like in a periodic trigger? If so Why would you do that? And there is a memory leak , before the pick every unit in unit group thing use this: Trigger: Custom Script: set bj_wantDestroyGroup=true |
