- Joined
- Apr 23, 2010
- Messages
- 312
So as the title says, this is my first spell so don't be too rough on the criticism if you can help it. Anyways, I have a couple of problems.
Problem #1: When I use "bj_wantDestroyGroup = true" or "call DestroyGroup(udg_groupvar)" it ruins the trigger below and does not damage or create special effects on the units in the group. Please not that this trigger is initially off and is turned on by the next trigger.
Problem #2: I can't get this to be MUI. When the ability is cast with 2 heroes, the first cast spell works but the 2nd cast spell does nothing.
Here is the other trigger.
If anyone could help me out it would be very appreciated!
Problem #1: When I use "bj_wantDestroyGroup = true" or "call DestroyGroup(udg_groupvar)" it ruins the trigger below and does not damage or create special effects on the units in the group. Please not that this trigger is initially off and is turned on by the next trigger.
-
Spell Loop
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
-
For each (Integer IndexLoop) from 1 to Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- Time[Index] Equal to 20
- (Caster[Index] is alive) Equal to False
- (Caster[Index] has buff Sleep (Pause)) Equal to True
- (Caster[Index] has buff Stunned (Pause)) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
Unit Group - Pick every unit in DamageGroup[Index] and do (Actions)
-
Loop - Actions
- Unit Group - Remove (Picked unit) from DamageGroup[Index]
-
Loop - Actions
- Set Caster[Index] = No unit
- Set Time[Index] = 0
- Set Index = 0
- Trigger - Turn off (This trigger)
- Skip remaining actions
-
Unit Group - Pick every unit in DamageGroup[Index] and do (Actions)
-
Else - Actions
-
Unit Group - Pick every unit in DamageGroup[Index] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is dead) Equal to True
-
Then - Actions
- Unit Group - Remove (Picked unit) from DamageGroup[Index]
-
Else - Actions
- Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - Damage[Index])
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in DamageGroup[Index] and do (Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set Time[Index] = (Time[Index] + 1)
-
For each (Integer IndexLoop) from 1 to Index, do (Actions)
-
Events
Here is the other trigger.
-
Spell
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Mind Blast
-
Actions
- Set Index = (Index + 1)
- Set Caster[Index] = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Mind Blast for Caster[Index]) Equal to 1
-
Then - Actions
- Set Damage[Index] = ((Real((Intelligence of Caster[Index] (Exclude bonuses)))) / 3.00)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Mind Blast for Caster[Index]) Equal to 2
-
Then - Actions
- Set Damage[Index] = ((Real((Intelligence of Caster[Index] (Exclude bonuses)))) / 2.00)
-
Else - Actions
- Set Damage[Index] = (Real((Intelligence of Caster[Index] (Exclude bonuses))))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set CasterOwner[Index] = (Owner of Caster[Index])
- Set Target[Index] = (Target point of ability being cast)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 200.00 of Target[Index] matching ((((Picked unit) is A structure) Equal to False) and ((((Picked unit) belongs to an ally of CasterOwner[Index]) Equal to False) and (((Picked unit) is Magic Immune) Equal to False)))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is dead) Equal to True
- Then - Actions
-
Else - Actions
- Unit Group - Add (Picked unit) to DamageGroup[Index]
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Trigger - Turn on Spell Loop <gen>
- Custom script: call RemoveLocation(udg_Target[udg_Index])
-
Events