- Joined
- Aug 12, 2005
- Messages
- 205
I am with a fatal doubt :? ! My problem is with an array variable unit group that I created! The trigger that I'm trying to do is this:
Event=>
-A unit begins casting an ability!
Condition=>
-Ability being cast equal to ... (It doesn't interest here
)
Actions =>
-Set integer = integer + 1
-Set Spell_Target[integer] = target unit of ability...
-Add target unit of ability being cast to Spell Unit Group[integer]
-Create a dummy unit for owner of casting unit...
-Set Spell_Unit[integer] = Last Created Unit
-Order last created unit to attack Spell_Target[integer]
-Add last created unit to Spell Unit Group[integer]
Note:
integer is an integer variable, Spell Target and Spell unit are Unit Array variables both, Spell unit group is an array unit group variable. :lol:
everything OK in this trigger, but, my problem is with the other trigger that is:
Event=>
-A unit is attacked
Condition =>
-Attacked unit is in Spell unit group [...*]...
//Here is the problem! what I must to put at this [index]? I want this value checking all of the values from the Spell unit group variable, but I don't know exactly what function to use!
Thnx if u help me!
Event=>
-A unit begins casting an ability!
Condition=>
-Ability being cast equal to ... (It doesn't interest here
Actions =>
-Set integer = integer + 1
-Set Spell_Target[integer] = target unit of ability...
-Add target unit of ability being cast to Spell Unit Group[integer]
-Create a dummy unit for owner of casting unit...
-Set Spell_Unit[integer] = Last Created Unit
-Order last created unit to attack Spell_Target[integer]
-Add last created unit to Spell Unit Group[integer]
Note:
integer is an integer variable, Spell Target and Spell unit are Unit Array variables both, Spell unit group is an array unit group variable. :lol:
everything OK in this trigger, but, my problem is with the other trigger that is:
Event=>
-A unit is attacked
Condition =>
-Attacked unit is in Spell unit group [...*]...
//Here is the problem! what I must to put at this [index]? I want this value checking all of the values from the Spell unit group variable, but I don't know exactly what function to use!
Thnx if u help me!
