[SOLVED] Problem With Custom Spells And Gui
alright, so here is my problem.
I have changed the siphon mana spell to siphon health. I have also changed the battle roar spell to add damage. The battle roar and siphon mana spells work fine on their own, but when i put them together in a single tower it becomes tricky. Now this is probably the dumb way to do it but here is what i have
(Please dont tell me about leaks and things, its a wip and beta code)
The Second Trigger (For Battle roar)
The problem is when the tower has to become invulnerable to siphon mana correctely. If i have the tower targeted as Invulnerable the siphon mana spell works but the battle roar does not. if i have it set as structure it gets attacked when its invulnerable. i dont usually have problems but this one is a toughy. Also before the Soul Reaper tower their is bones tower which shares the battle roar spell. if you need anymore info let me know
alright, so here is my problem.
I have changed the siphon mana spell to siphon health. I have also changed the battle roar spell to add damage. The battle roar and siphon mana spells work fine on their own, but when i put them together in a single tower it becomes tricky. Now this is probably the dumb way to do it but here is what i have
(Please dont tell me about leaks and things, its a wip and beta code)
-
Reaper Tower
-
Events
-
Unit - A unit owned by Player 9 (Gray) Is attacked
-
Unit - A unit owned by Player 10 (Light Blue) Is attacked
-
Conditions
-
(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
Actions
-
Unit Group - Pick every unit in (Random 1 units from (Units within 700.00 of (Position of (Attacking unit)) matching (((Matching unit) is dead) Equal to (==) True))) and do (Actions)
-

Loop - Actions
-


Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-



Then - Actions
-




Unit - Remove Invulnerable (Neutral) from (Attacking unit)
-




Unit - Set life of (Attacking unit) to 100.00
-




Unit - Set mana of (Attacking unit) to 1.00
-




Unit - Order (Attacking unit) to Human Blood Mage - Siphon Mana (Attacked unit)
-




Wait until ((Life of (Attacking unit)) Equal to (==) 600.00), checking every 1.00 seconds
-





Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-






If - Conditions
-







(Life of (Attacking unit)) Equal to (==) 600.00
-
-






Then - Actions
-







Unit - Set level of Extract Soul for (Attacking unit) to 10
-







Unit - Set mana of (Attacking unit) to 1.00
-







Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-







Unit - Add Invulnerable (Neutral) to (Attacking unit)
-
-






Else - Actions
-
-
-
-



Else - Actions
-
-
-
The Second Trigger (For Battle roar)
-
Bones Tower
-
Events
-
Unit - A unit owned by Player 9 (Gray) Is attacked
-
Unit - A unit owned by Player 10 (Light Blue) Is attacked
-
Conditions
-

Multiple ConditionsOr - Any (Conditions) are true
-


Conditions
-



(Unit-type of (Attacking unit)) Equal to (==) Bones Tower
-



(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-
-
-
Unit Group - Pick every unit in (Random 1 units from (Units within 700.00 of (Position of (Attacking unit)) matching (((Matching unit) is dead) Equal to (==) True))) and do (Actions)
-

Loop - Actions
-


Unit - Set the custom value of (Attacking unit) to ((Custom value of (Attacking unit)) + 1)
-



Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




If - Conditions
-





(Custom value of (Attacking unit)) Equal to (==) 2
-
-




Then - Actions
-





Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-





Special Effect - Destroy (Last created special effect)
-





Unit - Remove (Picked unit) from the game
-





Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-





Unit - Set mana of (Attacking unit) to 1.00
-





Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-




Else - Actions
-





Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-






If - Conditions
-







(Custom value of (Attacking unit)) Equal to (==) 4
-
-






Then - Actions
-







Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-







Special Effect - Destroy (Last created special effect)
-







Unit - Remove (Picked unit) from the game
-







Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-







Unit - Set mana of (Attacking unit) to 1.00
-







Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-






Else - Actions
-







Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-








If - Conditions
-









(Custom value of (Attacking unit)) Equal to (==) 6
-
-








Then - Actions
-









Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-









Special Effect - Destroy (Last created special effect)
-









Unit - Remove (Picked unit) from the game
-









Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-









Unit - Set mana of (Attacking unit) to 1.00
-









Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-








Else - Actions
-









Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-










If - Conditions
-











(Custom value of (Attacking unit)) Equal to (==) 8
-
-










Then - Actions
-











Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-











Special Effect - Destroy (Last created special effect)
-











Unit - Remove (Picked unit) from the game
-











Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-











Unit - Set mana of (Attacking unit) to 1.00
-











Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-










Else - Actions
-











Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-












If - Conditions
-













(Custom value of (Attacking unit)) Equal to (==) 10
-
-












Then - Actions
-













Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-













Special Effect - Destroy (Last created special effect)
-













Unit - Remove (Picked unit) from the game
-













Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-













Unit - Set mana of (Attacking unit) to 1.00
-













Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-












Else - Actions
-













Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-














If - Conditions
-















(Custom value of (Attacking unit)) Equal to (==) 12
-















(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-














Then - Actions
-















Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-















Special Effect - Destroy (Last created special effect)
-















Unit - Remove (Picked unit) from the game
-















Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-















Unit - Set mana of (Attacking unit) to 1.00
-















Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-














Else - Actions
-















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
















If - Conditions
-

















(Custom value of (Attacking unit)) Equal to (==) 14
-

















(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-
















Then - Actions
-

















Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-

















Special Effect - Destroy (Last created special effect)
-

















Unit - Remove (Picked unit) from the game
-

















Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-

















Unit - Set mana of (Attacking unit) to 1.00
-

















Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-
















Else - Actions
-

















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-


















If - Conditions
-



















(Custom value of (Attacking unit)) Equal to (==) 16
-



















(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-


















Then - Actions
-



















Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-



















Special Effect - Destroy (Last created special effect)
-



















Unit - Remove (Picked unit) from the game
-



















Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-



















Unit - Set mana of (Attacking unit) to 1.00
-



















Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-


















Else - Actions
-



















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




















If - Conditions
-





















(Custom value of (Attacking unit)) Equal to (==) 18
-





















(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-




















Then - Actions
-





















Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-





















Special Effect - Destroy (Last created special effect)
-





















Unit - Remove (Picked unit) from the game
-





















Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-





















Unit - Set mana of (Attacking unit) to 1.00
-





















Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-




















Else - Actions
-





















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-






















If - Conditions
-























(Custom value of (Attacking unit)) Equal to (==) 20
-























(Unit-type of (Attacking unit)) Equal to (==) Reaper Tower
-
-






















Then - Actions
-























Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
-























Special Effect - Destroy (Last created special effect)
-























Unit - Remove (Picked unit) from the game
-























Unit - Set level of Extract Soul for (Attacking unit) to ((Level of Extract Soul for (Attacking unit)) + 1)
-























Unit - Set mana of (Attacking unit) to 1.00
-























Unit - Order (Attacking unit) to Special Rexxar - Battle Roar
-
-






















Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The problem is when the tower has to become invulnerable to siphon mana correctely. If i have the tower targeted as Invulnerable the siphon mana spell works but the battle roar does not. if i have it set as structure it gets attacked when its invulnerable. i dont usually have problems but this one is a toughy. Also before the Soul Reaper tower their is bones tower which shares the battle roar spell. if you need anymore info let me know
Last edited:






