- Joined
- Sep 30, 2008
- Messages
- 1,460
This bug is a lot simpler than it might seem at first
Basically, I have made a GUI triggered spell which, when casted, causes the heroes pets to explode, dealing area damage depending on the units level.
The bugs I have are as follows:
- I need a way to make the spell unable to target any unit, except the pets
- The area damage that is dealt harms allies as well
Any idea how to fix these? Ive provided my code so far below
Basically, I have made a GUI triggered spell which, when casted, causes the heroes pets to explode, dealing area damage depending on the units level.
The bugs I have are as follows:
- I need a way to make the spell unable to target any unit, except the pets
- The area damage that is dealt harms allies as well
Any idea how to fix these? Ive provided my code so far below
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Ability being cast) Equal to |cffff8040Dispatch|r
-
Conditions
-
And - All (Conditions) are true
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Then - Actions
- Set Player = Player Group - Player 1 (Red)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 2 (Blue)
-
Then - Actions
- Set Player = Player Group - Player 2 (Blue)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 3 (Teal)
-
Then - Actions
- Set Player = Player Group - Player 3 (Teal)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 4 (Purple)
-
Then - Actions
- Set Player = Player Group - Player 4 (Purple)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
-
Then - Actions
- Set Player = Player Group - Player 5 (Yellow)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 6 (Orange)
-
Then - Actions
- Set Player = Player Group - Player 6 (Orange)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- (Unit-type of (Target unit of ability being cast)) Not equal to |cff4e4e4eMongrol|r (Level 1)
- (Unit-type of (Target unit of ability being cast)) Not equal to |cff4e4e4eMongrol|r (Level 2)
- (Unit-type of (Target unit of ability being cast)) Not equal to |cff4e4e4eMongrol|r (Level 3)
- (Unit-type of (Target unit of ability being cast)) Not equal to |cff4e4e4eMongrol|r (Level 4)
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Game - Display to Player the text: You must select one...
- Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + 80.00)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Target unit of ability being cast)) Equal to |cff4e4e4eMongrol|r (Level 1)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using war3mapImported\ExplosionBIG.mdx
- Set Dispatch[0] = (Last created special effect)
- Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 200.00 at (Position of (Target unit of ability being cast)), dealing 75.00 damage of attack type Spells and damage type Normal
- Unit - Explode (Target unit of ability being cast)
- Wait 2.00 game-time seconds
- Special Effect - Destroy Dispatch[0]
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Target unit of ability being cast)) Equal to |cff4e4e4eMongrol|r (Level 2)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using war3mapImported\ExplosionBIG.mdx
- Set Dispatch[0] = (Last created special effect)
- Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 200.00 at (Position of (Target unit of ability being cast)), dealing 150.00 damage of attack type Spells and damage type Normal
- Unit - Explode (Target unit of ability being cast)
- Wait 2.00 game-time seconds
- Special Effect - Destroy Dispatch[0]
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Target unit of ability being cast)) Equal to |cff4e4e4eMongrol|r (Level 3)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using war3mapImported\ExplosionBIG.mdx
- Set Dispatch[0] = (Last created special effect)
- Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 200.00 at (Position of (Target unit of ability being cast)), dealing 225.00 damage of attack type Spells and damage type Normal
- Unit - Explode (Target unit of ability being cast)
- Wait 2.00 game-time seconds
- Special Effect - Destroy Dispatch[0]
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Target unit of ability being cast)) Equal to |cff4e4e4eMongrol|r (Level 4)
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using war3mapImported\ExplosionBIG.mdx
- Set Dispatch[0] = (Last created special effect)
- Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 200.00 at (Position of (Target unit of ability being cast)), dealing 300.00 damage of attack type Spells and damage type Normal
- Unit - Explode (Target unit of ability being cast)
- Wait 2.00 game-time seconds
- Special Effect - Destroy Dispatch[0]
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)