i made 2 trigger enhanced spell
this is the first spell...
here comes the problem... i added this trigger for the hero's third spell (passive)
now when i cast the first spell and came to the point of damaging (unit group)
the passive skill also activates... it adds to the custom value of the unit. stunning the target...
how can i prevent this?
this is the first spell...
Code:
Lightning Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Strike
Actions
Set LightningStrike = True
Set TempPoint = (Position of (Target unit of ability being cast))
Set TempInteger = (25 + (25 x (Level of (Ability being cast) for (Triggering unit))))
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 600.00 of TempPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((Matching unit) Not equal to (Target unit of ability being cast)))) and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
Special Effect - Destroy (Last created special effect)
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (10.00 + (Real((5 x (Level of (Ability being cast) for (Triggering unit)))))) damage of attack type Spells and damage type Normal
Set TempInteger = (TempInteger + (10 + (10 x (Level of (Ability being cast) for (Triggering unit)))))
Floating Text - Create floating text that reads ((String(TempInteger)) + !) above (Target unit of ability being cast) with Z offset 0.00, using font size 11.00, color (10.00%, 25.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Custom script: call RemoveLocation(udg_TempPoint)
Set LightningStrike = False
here comes the problem... i added this trigger for the hero's third spell (passive)
Code:
DMG Implement
Events
Conditions
(Damage taken) Greater than 0.00
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A structure) Equal to False
(Level of Hammer Drive for (Damage source)) Greater than or equal to 1
LightningStrike Equal to False
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Damage source)) Greater than or equal to (8 - (Level of Hammer Drive for (Damage source)))
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Set TempPoint = (Position of (Triggering unit))
Special Effect - Destroy HammerDrive[1]
Special Effect - Destroy HammerDrive[2]
Special Effect - Destroy HammerDrive[3]
Unit - Set the custom value of (Damage source) to 0
Unit - Create 1 Dummy for (Owner of (Damage source)) at TempPoint facing Default building facing degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add HammerDrive to (Last created unit)
Unit - Order (Last created unit) to Neutral - Hurl Boulder (Triggering unit)
Custom script: call RemoveLocation(udg_TempPoint)
Else - Actions
Do nothing
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Custom value of (Damage source)) - (8 - (Level of Hammer Drive for (Damage source)))) Equal to -1
Then - Actions
Special Effect - Create a special effect attached to the (hand + right) of (Damage source) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
Set HammerDrive[1] = (Last created special effect)
Special Effect - Create a special effect attached to the (hand + left) of (Damage source) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
Set HammerDrive[2] = (Last created special effect)
Special Effect - Create a special effect attached to the chest of (Damage source) using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
Set HammerDrive[3] = (Last created special effect)
Else - Actions
Unit - Set the custom value of (Damage source) to ((Custom value of (Damage source)) + 1)
Else - Actions
now when i cast the first spell and came to the point of damaging (unit group)
the passive skill also activates... it adds to the custom value of the unit. stunning the target...
how can i prevent this?