| 01-04-2009, 10:15 AM | #1 |
I need a way to remove wards from a specific area. I've tried like 4 diffrent things and i think they're all impossible with WC3:TFT. I just need to remove sentry wards and the wards that creeps drop from my map but keep it so people can use the item/spell. I've tried killing/removing them every 45 seconds(i couldn't code it maybe someone else knows how to[i couldn't get it to recognize my unit group. Were unit groups even the correct type of triggering unit to use?]), having an invulnerable creep kill it(but it shares it's vision with creeps so for balance reasons that was scrapped), having said invulnerable unit walk around the map(I could never get it to do more than just go to the second spot then it would go back to the first region and not follow anymore trigger commands[would a nested loop work for this. my loops were all seperate triggers]). So if anyone knows how or can think of a way to remove sentry and watcher wards from certain regions(not sure if that's the right word to use)/areas on a map while keeping the spell castable please tell me how. |
| 01-04-2009, 06:27 PM | #2 |
You should probably use a unit group to do this. The complexity and efficiency of the process depends on whether or not you are using GUI or JASS. In GUI it would be something like: Set Group = Units in range of location Matching (condition) Pick Each unit in Group and do - Actions Kill Picked unit then after the loop is done: Clean and Destroy group. The condition would be that the unit is type ward, which i've never experimented with so I can't really be more specific. EDIT: This is more of a triggers/scripts related topic, start it there next time Mike. |
| 01-05-2009, 12:52 AM | #3 |
What exactly is a unit group? This has been confusing me forever. |
| 01-05-2009, 04:16 AM | #4 |
It's a handle that stores units in it, kind of like a bag filled with objects. Groups are essential if you want to find units in range of a point, in fact I think it might be the only way in JASS. You can add and remove units from a group at various points in time. Does that answer your question? |
| 01-05-2009, 05:31 PM | #5 |
Unit groups are a variable, an empty value or blank canvas you make unit groups by opening the trigger editor, opening the variable window (a small green x on the upper bar of the trigger editor window) and look through it for "Unit Group" Zerzax's script is good and solid, it wont be troublesome |
