- Joined
- Apr 23, 2010
- Messages
- 11
Hello guys! I have a problem with a trigger. It's a spell. Supposed to be a "grip-style" spell. I based it of the "Chain Lightning" spell, so that I would get the "Chain Lightning" chain special effect directly in the object editor. Everything works. The spell is supposed to move the unit to a given point, which I will edit later. (Not what I need help with). However, I try to add a range condition which will disable use of the spell when the units are too close. I used 300, in range. There is a problem with this:
The units will still move. The only thing that happens is that they do not generate the "Chain Lightning" chain effect.
Another problem:
When I add the Far Seer missile effect to his hands, they will not be removed when I run the "Destroy Special effect <VariableHere> [Player number(Owner of casting unit)))]
What do I have to do to fix problem one? And how do I make the special effects to his hands go away when he casts the grip spell?
Trigger:
The units will still move. The only thing that happens is that they do not generate the "Chain Lightning" chain effect.
Another problem:
When I add the Far Seer missile effect to his hands, they will not be removed when I run the "Destroy Special effect <VariableHere> [Player number(Owner of casting unit)))]
What do I have to do to fix problem one? And how do I make the special effects to his hands go away when he casts the grip spell?
Trigger:
-
ElementalGrip
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Elemental Grip
-
-
Actions
-
Unit Group - Pick every unit in (Units within 300.00 of (Position of (Casting unit))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Equal to (Target unit of ability being cast)
-
-
Then - Actions
-
Player - Disable SpellBookSpellName[3] for (Owner of (Casting unit))
-
Unit - Order (Casting unit) to Stop
-
Wait 1.00 seconds
-
Special Effect - Destroy LightningAuraVariableLeft[(Player number of (Owner of (Casting unit)))]
-
Special Effect - Destroy LightningAuraVariableRight[(Player number of (Owner of (Casting unit)))]
-
Wait 2.00 seconds
-
Player - Enable SpellBookSpellName[3] for (Owner of (Casting unit))
-
-
Else - Actions
-
Special Effect - Create a special effect attached to the left hand of (Casting unit) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Set LightningAuraVariableLeft[(Player number of (Owner of (Casting unit)))] = (Last created special effect)
-
Special Effect - Create a special effect attached to the right hand of (Casting unit) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Set LightningAuraVariableRight[(Player number of (Owner of (Casting unit)))] = (Last created special effect)
-
Unit - Move (Target unit of ability being cast) instantly to (Position of (Casting unit)), facing (Facing of (Casting unit)) degrees
-
Player - Disable SpellBookSpellName[3] for (Owner of (Casting unit))
-
Wait 1.00 seconds
-
Special Effect - Destroy LightningAuraVariableLeft[(Player number of (Owner of (Casting unit)))]
-
Special Effect - Destroy LightningAuraVariableRight[(Player number of (Owner of (Casting unit)))]
-
Wait 2.00 seconds
-
Player - Enable SpellBookSpellName[3] for (Owner of (Casting unit))
-
-
-
-
-
-