Spell Calamity Strike

13lade619

is now a game developer :)
Reaction score
398
okay, sorry about the caster_loc leak,

what should i do about the group leak?

EDIT:

this is what the trigger looks like now:

Code:
Calamity Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Calamity Strike 
    Actions
        Set CS_Caster = (Triggering unit)
        If ((Level of Calamity Strike  for CS_Caster) Equal to 1) then do (Set CS_Loops = 10) else do (Do nothing)
        If ((Level of Calamity Strike  for CS_Caster) Equal to 2) then do (Set CS_Loops = 15) else do (Do nothing)
        If ((Level of Calamity Strike  for CS_Caster) Equal to 3) then do (Set CS_Loops = 20) else do (Do nothing)
        For each (Integer A) from 1 to CS_Loops, do (Actions)
            Loop - Actions
                Set CS_Caster_loc = (Position of CS_Caster)
                Set CS_TargetGroup = (Units within 1000.00 of CS_Caster_loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of CS_Caster)) Equal to True)))
                Set CS_RealTargetGroup = (Random 1 units from CS_TargetGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in CS_TargetGroup) Greater than 0
                        (CS_Caster is alive) Equal to True
                    Then - Actions
                        Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
                            Loop - Actions
                                Set CS_Target = (Picked unit)
                                Set CS_Point = (Position of CS_Target)
                                Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
                                Unit - Add Crow Form to (Last created unit)
                                Animation - Change (Last created unit) flying height to 1000.00 at 1000000000.00
                                Unit - Add LightningFX  to (Last created unit)
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning CS_Target
                                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                        Wait 0.10 seconds
                        Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
                            Loop - Actions
                                Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
                                Unit - Add CalamityStrikeDamage  to (Last created unit)
                                Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
                                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                                Special Effect - Create a special effect at CS_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                                Special Effect - Destroy (Last created special effect)
                    Else - Actions
                Custom script:   call DestroyGroup(udg_CS_TargetGroup)
                Custom script:   call RemoveLocation(udg_CS_Point)
                Custom script:   call DestroyGroup(udg_CS_RealTargetGroup)
                Custom script:   call RemoveLocation(udg_CS_Caster_loc)
                Wait 1.00 seconds

i moved the leak removal from the if/then/else function.

one question:

can i remove this unit group loop and just paste the functions under the loop below the wait?

Code:
Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
    Loop - Actions
        Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
        Unit - Add CalamityStrikeDamage  to (Last created unit)
        Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
        Special Effect - Create a special effect at CS_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
        Special Effect - Destroy (Last created special effect)

EDIT # 2 :

i removed the second unit group loop.

Re-uploaded the map. it should be leak-free by now.

-
thehelperDoubleAnimatedUB.gif
 

Sim

Forum Administrator
Staff member
Reaction score
534
> can i remove this unit group loop and just paste the functions under the loop below the wait?

Depends if you want the wait to happen or not. If you do not need the wait, paste it. If you need the wait, don't do it. :p

------------

Looks ok, except one point removal.

"Custom script: call RemoveLocation(udg_CS_Point)"

Put it inside the if-then-else. More precisely: in the "Then actions", inside the Unit group loop.
 

13lade619

is now a game developer :)
Reaction score
398
this is the trigger now:

Code:
Calamity Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Calamity Strike 
    Actions
        Set CS_Caster = (Triggering unit)
        If ((Level of Calamity Strike  for CS_Caster) Equal to 1) then do (Set CS_Loops = 10) else do (Do nothing)
        If ((Level of Calamity Strike  for CS_Caster) Equal to 2) then do (Set CS_Loops = 15) else do (Do nothing)
        If ((Level of Calamity Strike  for CS_Caster) Equal to 3) then do (Set CS_Loops = 20) else do (Do nothing)
        For each (Integer A) from 1 to CS_Loops, do (Actions)
            Loop - Actions
                Set CS_Caster_loc = (Position of CS_Caster)
                Set CS_TargetGroup = (Units within 1000.00 of CS_Caster_loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of CS_Caster)) Equal to True)))
                Set CS_RealTargetGroup = (Random 1 units from CS_TargetGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in CS_TargetGroup) Greater than 0
                        (CS_Caster is alive) Equal to True
                    Then - Actions
                        Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
                            Loop - Actions
                                Set CS_Target = (Picked unit)
                                Set CS_Point = (Position of CS_Target)
                                Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
                                Unit - Add Crow Form to (Last created unit)
                                Animation - Change (Last created unit) flying height to 1000.00 at 1000000000.00
                                Unit - Add LightningFX  to (Last created unit)
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning CS_Target
                                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                        Wait 0.10 seconds
                        Unit - Create 1 Dummy for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
                        Unit - Add CalamityStrikeDamage  to (Last created unit)
                        Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
                        Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                        Special Effect - Create a special effect at CS_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call RemoveLocation(udg_CS_Point)
                    Else - Actions
                Custom script:   call DestroyGroup(udg_CS_TargetGroup)
                Custom script:   call DestroyGroup(udg_CS_RealTargetGroup)
                Custom script:   call RemoveLocation(udg_CS_Caster_loc)
                Wait 1.00 seconds

please reply ASAP:D
 

Sim

Forum Administrator
Staff member
Reaction score
534
Well, right now the line

"Custom script: call RemoveLocation(udg_CS_Point)"

isn't in the loop and, normally wouldn't remove the leaks. But as your group contains only one unit... It works out :p

Just know that if you have a group composed of more than one unit, it is important to remove the location everytime at the end of the loop (IF you set it in that loop!)

Update the map and I'll test it again.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Nice job 13lade! It looks nice, clean, and leakless, but IMO isn't too hard to implement and create. All the same, it is great! :D

@Daxtreme: Woah, when did you become a spells moderator? :D
 
W

wutizdo

Guest
how do i export tat skill to my map plz help im new ^^ n i only kno som stuff not sure about the trigger part only
 

13lade619

is now a game developer :)
Reaction score
398
i think there's a small bug but it's only in the object editor. sorry.

the ability doesn't target air units, eventhough the lightning hits them.

all you have to do is add "air" to the targets of the damage ability (custom war stomp)

-

there's a readme on the triggers

-
thanks for approving my spell:D
thehelperTripleAnimatedUB.gif
 

Sim

Forum Administrator
Staff member
Reaction score
534
I would suggest updating your post with the new map with added "air" target.
 
J

Javonovich

Guest
Help with Calamity Strike and another ability

Hi guys,

I'm just having a slight problem with Calamity Strike that I thought you might be able to help me out with. I'm using Calamity Strike (limited to 10 loops with no cinematic effects) in my map on a hero that also has this ability, <http://www.hiveworkshop.com/resources_new/spells/780/>, Thunder Call.

My problem is that after I cast Calamity Strike, if I cast Thunder Call right after it, then Calamity Strike will stop and no more lightning bolts will come down. I was just wondering if you had any ideas about why this was happening.

Here is the code for Calamity Strike in my map:
Code:
Calamity Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Impact (calamity strike)
    Actions
        Set CS_Caster = (Triggering unit)
        If ((Level of Impact (calamity strike) for CS_Caster) Equal to 1) then do (Set CS_Loops = 10) else do (Do nothing)
        For each (Integer A) from 1 to CS_Loops, do (Actions)
            Loop - Actions
                Set CS_Caster_loc = (Position of CS_Caster)
                Set CS_TargetGroup = (Units within 1000.00 of CS_Caster_loc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of CS_Caster)) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A s
                Set CS_RealTargetGroup = (Random 1 units from CS_TargetGroup)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Number of units in CS_TargetGroup) Greater than 0
                        (CS_Caster is alive) Equal to True
                    Then - Actions
                        Unit Group - Pick every unit in CS_RealTargetGroup and do (Actions)
                            Loop - Actions
                                Set CS_Target = (Picked unit)
                                Set CS_Point = (Position of CS_Target)
                                Unit - Create 1 Dummy (Calamity Strike) for (Owner of CS_Caster) at CS_Point facing Default building facing degrees
                                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning CS_Target
                        Wait 0.10 seconds
                        Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
                        Special Effect - Create a special effect at CS_Point using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call RemoveLocation(udg_CS_Point)
                        Wait 0.50 seconds
                    Else - Actions
                Custom script:   call DestroyGroup(udg_CS_TargetGroup)
                Custom script:   call DestroyGroup(udg_CS_RealTargetGroup)
                Custom script:   call RemoveLocation(udg_CS_Caster_loc)

Here is the code for Thunder Call:
Code:
Thunder Call
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Thunder Call 
    Actions
        Set LocPoint1 = (Position of (Casting unit))
        Set LocPoint2 = (Target point of ability being cast)
        Set LocPoint3 = (LocPoint1 offset by 150.00 towards (Angle from LocPoint1 to LocPoint2) degrees)
        Special Effect - Create a special effect at LocPoint3 using Objects\Spawnmodels\NightElf\NEDeathSmall\NEDeathSmall.mdl
        Special Effect - Destroy (Last created special effect)
        Special Effect - Create a special effect at LocPoint3 using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Create 1 Dummy Damage for (Owner of (Casting unit)) at LocPoint3 facing (Angle from LocPoint1 to LocPoint2) degrees
        Animation - Change (Last created unit)'s size to ((250.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%, (250.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%, (250.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%) of its original size
        Unit - Create 1 Dummy Thunder Clap for (Owner of (Casting unit)) at LocPoint3 facing (Angle from LocPoint1 to LocPoint2) degrees
        Animation - Change (Last created unit)'s size to ((350.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%, (350.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%, (350.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%) of its original size
        Animation - Change (Last created unit)'s animation speed to 15.00% of its original speed
        Custom script:   call RemoveLocation( udg_LocPoint3 ) 
        Set LocReal = ((((Real((Intelligence of (Triggering unit) (Exclude bonuses)))) x (Real((Level of (Ability being cast) for (Triggering unit))))) x 2.00) + 100.00)
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Set LocPoint3 = (LocPoint1 offset by ((Real((Integer A))) x 200.00) towards (Angle from LocPoint1 to LocPoint2) degrees)
                Unit - Create 1 Dummy Nuke for (Owner of (Triggering unit)) at LocPoint3 facing Default building facing degrees
                Set TempUnitGroup = (Units within 300.00 of LocPoint3 matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to False) and ((((Matching unit) is An Ancient) Equal to False) and (((Unit-type of (Matching unit)) is Magic Immune) Equal to False))))
                Unit Group - Pick every unit in TempUnitGroup and do (Actions)
                    Loop - Actions
                        Unit - Cause (Last created unit) to damage (Picked unit), dealing LocReal damage of attack type Normal and damage type Normal
                        Unit - Add classification of An Ancient to (Picked unit)
                Custom script:   call DestroyGroup( udg_TempUnitGroup ) 
                Destructible - Pick every destructible within 300.00 of LocPoint3 and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Picked destructible) is alive) Equal to True
                            Then - Actions
                                Destructible - Kill (Picked destructible)
                            Else - Actions
                Custom script:   call RemoveLocation( udg_LocPoint3 ) 
        For each (Integer A) from 1 to 5, do (Actions)
            Loop - Actions
                Set LocPoint3 = (LocPoint1 offset by ((Real((Integer A))) x 200.00) towards (Angle from LocPoint1 to LocPoint2) degrees)
                Set TempUnitGroup = (Units within 300.00 of LocPoint3 matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is An Ancient) Equal to True)))
                Unit Group - Pick every unit in TempUnitGroup and do (Actions)
                    Loop - Actions
                        Unit - Remove classification of An Ancient from (Picked unit)
                Custom script:   call DestroyGroup( udg_TempUnitGroup ) 
                Custom script:   call RemoveLocation( udg_LocPoint3 ) 
        Set LocPoint3 = (LocPoint1 offset by ((Real((Integer A))) x 900.00) towards (Angle from LocPoint1 to LocPoint2) degrees)
        Environment - Create a 3.00 second wave deformation from LocPoint1 to LocPoint3 with radius 400.00, depth 128.00, and a 1.00 second trailing delay
        Custom script:   call RemoveLocation( udg_LocPoint1 ) 
        Custom script:   call RemoveLocation( udg_LocPoint2 ) 
        Custom script:   call RemoveLocation( udg_LocPoint3 )

It's almost as if the dummy unit for Calamity Strike is being removed somehow, or the loops are just ending. Any ideas?

-Javonovich
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top