Spell Whirlwind

Arcane

You can change this now in User CP.
Reaction score
87
Causes a whirlwind frost and blades around the Blademaster, rendering him immune to magic and dealing damage per second to nearby land units. Shards of ice also come flying out from the whirlwind, each shard deals damage and slows.

Made in GUI. (For now)
Not MUI.

Coding:
Code:
WWInitialize
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Whirlwind
    Actions
        Set WWCaster = (Triggering unit)
        Special Effect - Create a special effect attached to the weapon of (Triggering unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
        Set WWSFX[1] = (Last created special effect)
        Special Effect - Create a special effect attached to the hand,left of (Triggering unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
        Set WWSFX[2] = (Last created special effect)
        Special Effect - Create a special effect attached to the hand,right of (Triggering unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
        Set WWSFX[3] = (Last created special effect)
        Trigger - Turn on WWPeriodic <gen>
        Wait 6.00 seconds
        Trigger - Turn off WWPeriodic <gen>
        Special Effect - Destroy WWSFX[1]
        Special Effect - Destroy WWSFX[2]
        Special Effect - Destroy WWSFX[3]
        Unit Group - Pick every unit in WWMoveGroup and do (Actions)
            Loop - Actions
                Unit - Remove (Picked unit) from the game

Code:
WWPeriodic
    Events
        Time - Every 0.05 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (WWCaster is alive) Equal to True
            Then - Actions
                Set WWFrostBoltSpawnPoint = (Position of WWCaster)
                Unit - Create 1 WWFrostBolt for (Owner of WWCaster) at WWFrostBoltSpawnPoint facing (Random angle) degrees
                Custom script:   call RemoveLocation (udg_WWFrostBoltSpawnPoint)
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit Group - Add (Last created unit) to WWMoveGroup
                Unit Group - Pick every unit in WWMoveGroup and do (Actions)
                    Loop - Actions
                        Set WWBoltMovePoint = ((Position of (Picked unit)) offset by 25.00 towards (Facing of (Picked unit)) degrees)
                        Set WWPickedBoltPoint = (Position of WWPickedBolt)
                        Set WWConditions = (Units within 50.00 of WWPickedBoltPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of WWCaster)) Equal to True) and (((Matching unit) is dead) Equal to False))))
                        Set WWPickedBolt = (Picked unit)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Number of units in WWConditions) Equal to 0
                            Then - Actions
                                Unit - Move (Picked unit) instantly to WWBoltMovePoint
                                Custom script:   call RemoveLocation (udg_WWBoltMovePoint)
                            Else - Actions
                                Unit - Remove WWPickedBolt from the game
                                Unit Group - Remove WWPickedBolt from WWMoveGroup
                                Unit Group - Pick every unit in WWConditions and do (Actions)
                                    Loop - Actions
                                        Unit - Create 1 WWDummy for (Owner of WWCaster) at WWPickedBoltPoint facing Default building facing degrees
                                        Custom script:   call RemoveLocation (udg_WWPickedBoltPoint)
                                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                                        Unit - Set level of Nova  for (Last created unit) to (1 x (Integer((Real((Level of Whirlwind for WWCaster))))))
                                        Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                                        Unit - Cause WWCaster to damage (Picked unit), dealing (10.00 x (Real((Level of Whirlwind for WWCaster)))) damage of attack type Spells and damage type Cold
                                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                                        Special Effect - Destroy (Last created special effect)
                        Custom script:   call DestroyGroup (udg_WWConditions)
            Else - Actions
                Trigger - Turn off (This trigger)
                Special Effect - Destroy WWSFX[1]
                Special Effect - Destroy WWSFX[2]
                Special Effect - Destroy WWSFX[3]
                Unit Group - Pick every unit in WWMoveGroup and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game
 

Attachments

  • Whirlwind.jpg
    Whirlwind.jpg
    49.8 KB · Views: 396
  • Whirlwind.w3x
    58.1 KB · Views: 250

Hatebreeder

So many apples
Reaction score
381
Nice Spell.
Looks like a Blademaster Version of Tinki3's Fire Disk thingy.
Definatly nice.
But, is this MUI? (It contains waits, so i doubt it)
 

Arcane

You can change this now in User CP.
Reaction score
87
Nope. : (

This submission was meant as practice basically. I'm going to try and convert it to JASS in the future.

Edit: Running it on NewGen... ugh, apparently, there's a "double free of location" in WWPeriodic. I have no idea what that means, or how to fix it. -.-
 

Hatebreeder

So many apples
Reaction score
381
Nope. : (

This submission was meant as practice basically. I'm going to try and convert it to JASS in the future.

Edit: Running it on NewGen... ugh, apparently, there's a "double free of location" in WWPeriodic. I have no idea what that means, or how to fix it. -.-

Might be because of removing a leak two times, without having it created it again?
Never had a Leak like this ever before though.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
well i dunno if this is the double free but i should say this part:
Code:
            Else - Actions
                Trigger - Turn off (This trigger)
                Custom script:   call RemoveLocation (udg_WWFrostBoltSpawnPoint)
                Custom script:   call RemoveLocation (udg_WWBoltMovePoint)
                Custom script:   call RemoveLocation (udg_WWPickedBoltPoint)
                Custom script:   call DestroyGroup (udg_WWConditions)
                Special Effect - Destroy WWSFX[1]
                Special Effect - Destroy WWSFX[2]
                Special Effect - Destroy WWSFX[3]
                Unit Group - Pick every unit in WWMoveGroup and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game
should not remove the location since you didn't even set them here

and also you leak a location:
Code:
Set WWBoltMovePoint = ([B](Position of (Picked unit)[/B]) offset by 25.00 towards (Facing of (Picked unit)) degrees)
btw nice spell :p
 

Arcane

You can change this now in User CP.
Reaction score
87
Does putting the "remove point" right after it's moved to the BoltMovePoint fix the leak?

Gah, stupid double frees, looking through all that code and trying to find which ones you've already removed before if it takes this path or that path is really annoying.

Can somebody point it out and tell me how to fix it?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i just did....
i told you that those point removals aren't necessery cause you don't set any point when the condition goes false and run the 'Else' actions....
 
S

SarrySam

Guest
Looks good, reminds me a lot of "Frozen Orb" (for those who play Diablo 2)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top