• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Help with spell : Removing Leaks and Special effects

Status
Not open for further replies.
Level 6
Joined
Feb 21, 2008
Messages
205
Ok, I got this trigger. I target a point, then a star appears made out of lightning (Well it kinda looks like a star). There are more Lightning effects in the middle. So there are 12 lines that go out from the middle out in a circle of 250 range. Then there's 6 lines that go out from the middle aswell, but out in a 500 range.

The point of my ability is to do more damage in the middle, then less in the outer range. The ability was kinda boring alone, so I decided to add special effects. But am kinda new with all these fancy effects on my spells.

  • Lightning spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Quake [F]
    • Actions
      • Unit Group - Pick every unit in (Units within 500.00 of (Target point of ability being cast)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Quake [F] for (Triggering unit)) Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                • Then - Actions
                  • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Magic
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of AOE thing for (Triggering unit)) Equal to 2
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                    • Then - Actions
                      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 125.00 damage of attack type Spells and damage type Magic
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of AOE thing for (Triggering unit)) Equal to 3
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                        • Then - Actions
                          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Magic
                        • Else - Actions
                    • Else - Actions
      • Unit Group - Pick every unit in (Units within 250.00 of (Target point of ability being cast)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Quake [F] for (Triggering unit)) Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                • Then - Actions
                  • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Magic
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of AOE thing for (Triggering unit)) Equal to 2
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                    • Then - Actions
                      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 125.00 damage of attack type Spells and damage type Magic
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Level of AOE thing for (Triggering unit)) Equal to 3
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
                        • Then - Actions
                          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 150.00 damage of attack type Spells and damage type Magic
                        • Else - Actions
                    • Else - Actions
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set Lightning_effect = (Lightning_effect + 60.00)
          • Lightning - Create a Chain Lightning - Primary lightning effect from source (Target point of ability being cast) to target ((Target point of ability being cast) offset by 512.00 towards Lightning_effect degrees)
          • Special Effect - Create a special effect at ((Target point of ability being cast) offset by 490.00 towards Lightning_effect degrees) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • For each (Integer B) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set Lightning_effect = (Lightning_effect + 30.00)
          • Lightning - Create a Chain Lightning - Primary lightning effect from source (Target point of ability being cast) to target ((Target point of ability being cast) offset by 256.00 towards Lightning_effect degrees)
          • Special Effect - Create a special effect at ((Target point of ability being cast) offset by 234.00 towards Lightning_effect degrees) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
So, how do I remove the lightning effects after about 2sec? If possible get them to fade out, not instantly disappear. My troubles is that I cant store it in a variable since its multiple effects.

And my second would be that I need to stop being lazy and clear leaks, so if you could point those out aswell, that would be awesome.

Thanks for reading!

Edit: Yes I very well aware that it says quake, and it doesnt fit with the theme, and it says "AOE" thing on some points. But dont be afraid, those are just placeholders.

(The spell itself works fine btw)
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
First of all: Use Leak Check.

Second: Use Kingz lightning & fade system.

Also remember, you have to set all stuff to points and unit group variables such as

Target point of ability being cast
Offsets
Units in range from a set tempgroup = units in 500 range of temp point matching


AND to remove the special effects leaks

jsut use the destroy last created special effect line after each created line.

they wont be removed instantly anyway and they will perform as they should and still be removed
 
Level 6
Joined
Feb 21, 2008
Messages
205
Thanks alot for the reply, but "destroy last created special effect", I got created 12 effects at the same time. And it doesnt say last special effect-S.

Anyways, I guess I can try that. Thanks again for your reply!

Edit: I found "Leak Check", pretty usefull addon I must say. I tried googling and searching the Hiveworkshop tool section for the lightning fade system, but couln't find it. Got a link for it?
 
Level 18
Joined
Mar 13, 2009
Messages
1,411
One problem existing with the remove special effect is that it can remove effects that are inside an animation (if the animations take a lot of time). If you get this problem just make a dummy unit instead with the model of the special effect and give it a duration timer.
 
Status
Not open for further replies.
Top