- Joined
- Aug 31, 2009
- Messages
- 776
Hey everyone, I'm learning some HashTable functions and also the Key conversion tools.
Is it possible for me to do something like:
What I'm doing is a spell that summons units, but I want it so that when the caster dies, all the units summoned by that specific caster die.
I've tried a very basic set up as shown above, but it refuses to work.
What am I doing wrong here?
EDIT: I think I know the issue. By using a debug trigger to get the Key of units, it turns out the keys are usually around 7 digits long, and the Array of the Unit Group cannot take a number that big.
So how do I go about solving this problem?
Is it possible for me to do something like:
-
Events
-
Unit - A unit starts the effect of an ability
-
-
Conditions
-
--Doesn't Matter--
-
-
Actions
-
Unit - Create 1 Footman for (Owner of (Triggering Unit)) at (blah blah blah blah.....)
-
Unit Group - Add (Last created unit) to UnitGroup[Key(Triggering Unit)]
-
-
Events
-
Unit - A unit dies
-
-
Conditions
-
---Doesn't Matter---
-
-
Actions
-
Unit Group - Pick Every unit in UnitGroup[Key(Triggering Unit)] and do (Actions)
-
Unit - Kill (Picked Unit)
-
Unit Group - Remove (Picked Unit) from UnitGroup[Key(Triggering Unit)]
-
-
What I'm doing is a spell that summons units, but I want it so that when the caster dies, all the units summoned by that specific caster die.
I've tried a very basic set up as shown above, but it refuses to work.
What am I doing wrong here?
EDIT: I think I know the issue. By using a debug trigger to get the Key of units, it turns out the keys are usually around 7 digits long, and the Array of the Unit Group cannot take a number that big.
So how do I go about solving this problem?
Last edited: