HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit Group in Hashtable

01-18-2010, 05:43 AM#1
SmileyJeff
Unit group in hashtable is not working like Units/String/Integer/Real and others..
It just make my spell not MUI. Below is the brief code of what i did.


I am trying to make a pierce arrow. So when unit is in range on the arrow, they will get damage once by adding them to the damagedGroup after being damage.

But the problem is when i spam the skill, for example i shoots 5 arrows within 3 seconds to a far away point. Units that are in the line will only get damaged once by the 1st arrow. And the other arrow won't do damage. Because they are still in the damagedGroup for some reason.

Heres my example code:

Last Created unit is the Arrow. I create it when i run the trigger.
Trigger:
Hashtable - Save Handle OfArrow_DamagedGroup as (Key dmggroup) of (Key (Last created unit)) in myArrowTable

Every 0.03 seconds, i pick every unit in the ArrowGroup and load the damagedGroup
Trigger:
Set Arrow_DamagedGroup = (Load (Key dmggroup) of (Key (Picked unit)) in myArrowTable)

I set a unitGroup to get units around the arrow and do damage and pick every unit to do damage, after damage, i add them to Arrow_DamagedGroup
Trigger:
Unit Group - Add (Picked unit) to Arrow_DamagedGroup

Finally i update my group Hashtable.
Trigger:
Hashtable - Save Handle OfArrow_DamagedGroup as (Key dmggroup) of (Key (Picked unit)) in myArrowTable

But somehow all the above don't work. I know it has something to do with the damagedGroup. How do i make it MUI for each Arrow? I saved it in hash but it didn't work like other handles (Real, Unit, String, Integer)