Sub Zero v4.0.0.0

This bundle is marked as approved. It works and satisfies the submission rules.
This spell will create a nova of icy missiles around the caster to damage all units in range.

JASS:
/*********************************************************************
*
*   Sub Zero v4.0.0.0
*   By Magtheridon96
*
*   Description:
*   ------------
*
*       - This spell is a nova spell that creates projectiles of ice 
*       that emerge from the center of the casting unit even while he 
*       is moving.
*
*   Requirements:
*   -------------
*
*       - CTL                           [By Nestharus]
*       - WorldBounds                   [By Nestharus]
*       - SpellEffectEvent              [By Bribe]
*       - Table                         [By Bribe]
*
*   Implementation:
*   ---------------
*
*       - Implement all the required systems
*       - Copy this code into a new trigger
*       - Paste all the object data from the Object editor into your map
*       - Configure the system
*       - Done!
*
*********************************************************************/
library SubZero requires CTL, WorldBounds, SpellEffectEvent
    globals
        // Ability Code
        private constant integer    ABIL_CODE       = 'A000'
        // Dummy Code
        private constant integer    DUMMY           = 'h000'
        // Projectile Speed
        private constant real       VELOCITY        = 18.0
        // Attack Type
        private constant attacktype ATTACK_TYPE     = ATTACK_TYPE_NORMAL
        // Damage Type
        private constant damagetype DAMAGE_TYPE     = DAMAGE_TYPE_MAGIC
        // Max Collision size in Map
        private constant real       MAX_COLLISION   = 197.0
        // Missile Damage Radius
        private constant real       PROJ_DMG_RADIUS = 175.0
    endglobals
     
    private function GetMissiles takes integer level returns integer
        return 6 + level * 2
    endfunction
    
    private function GetDamage takes integer level returns real
        return level * 70.0
    endfunction
    
    private function GetRange takes integer level returns real
        return 550. + level * 50.
    endfunction
    
    private function TargetFilter takes unit u, player p, real x, real y returns boolean
        return IsUnitEnemy(u, p) and not IsUnitType(u, UNIT_TYPE_DEAD) and not IsUnitType(u, UNIT_TYPE_STRUCTURE) and not IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) and IsUnitInRangeXY(u, x, y, PROJ_DMG_RADIUS)
    endfunction
    
    private struct Spell extends array
    
        static Table data
        static Table array missiles
        static Table array hit
        static player array owner
        static unit array caster
        static real array distance
        static real array damage
        
        // You mad Jesus4Lyf?
        implement CTL
            
            local integer k
            local integer i
            local unit u
            local unit v
            local real x
            local real y
            
        implement CTLExpire
        
            set distance[this] = distance[this] + VELOCITY
            set i = 0
            
            loop
                set u = missiles[this].unit[i]
                exitwhen null == u
                
                set k = GetHandleId(u)
                
                set x = GetUnitX(caster[this]) + distance[this] * data.real[k * 2]
                set y = GetUnitY(caster[this]) + distance[this] * data.real[k * 2 + 1]
                
                if x < WorldBounds.maxX and x > WorldBounds.minX and y < WorldBounds.maxY and y > WorldBounds.minY and GetWidgetLife(u)>0.405 then
                
                    call SetUnitX(u, x)
                    call SetUnitY(u, y)
                    
                    // You mad Rising_Dusk?
                    call GroupEnumUnitsInRange(bj_lastCreatedGroup, x, y, PROJ_DMG_RADIUS + MAX_COLLISION, null)
                    
                    loop
                        set v = FirstOfGroup(bj_lastCreatedGroup)
                        exitwhen null == v
                        
                        set k = GetHandleId(v)
                        
                        if not hit[this].boolean.has(k) then
                            if TargetFilter(v, owner[this], x, y) then
                                call UnitDamageTarget(caster[this], v, damage[this], false, false, ATTACK_TYPE, DAMAGE_TYPE, null)
                                set hit[this].boolean[k] = true
                            endif
                        endif
                        
                        call GroupRemoveUnit(bj_lastCreatedGroup, v)
                    endloop
                    
                else
                    call destroy()
                    set caster[this] = null
                    set owner[this] = null
                    call hit[this].destroy()
                    
                    set i = 0
                    loop
                        set u = missiles[this].unit[i]
                        exitwhen null == u
                        call KillUnit(u)
                        set i = i + 1
                    endloop
                    
                    call missiles[this].destroy()
                    exitwhen true
                endif
                set i = i + 1
            endloop
            
        implement CTLNull
        implement CTLEnd
        
        static method start takes unit u, integer lvl returns nothing
            local thistype this = create()
            
            local integer m = GetMissiles(lvl)
            local integer i = m - 1
            local integer k = 0
            
            local real x = GetUnitX(u)
            local real y = GetUnitY(u)
            local real r = 0.03125 * GetRange(lvl) / VELOCITY
            
            set caster[this] = u
            set owner[this] = GetTriggerPlayer()
            set distance[this] = 0.0
            set damage[this] = GetDamage(lvl)
            
            set missiles[this] = Table.create()
            set hit[this] = Table.create()
            
            loop
                set u = CreateUnit(owner[this], DUMMY, x, y, i * 360.0 / m)
                set k = GetHandleId(u)
                
                set data.real[k*2] = Cos(i * 6.2831853 / m)
                set data.real[k*2+1] = Sin(i * 6.2831853 / m)
                
                call UnitApplyTimedLife(u, 'BTLF', r)
                set missiles[this].unit[i] = u
                
                // You mad Nestharus?
                exitwhen i == 0
                set i = i - 1
            endloop
            
            set u = null
        endmethod
        
        static method run takes nothing returns nothing
            call start(GetTriggerUnit(), GetUnitAbilityLevel(GetTriggerUnit(), ABIL_CODE))
        endmethod
        
        static method onInit takes nothing returns nothing
            call RegisterSpellEffectEvent(ABIL_CODE, function thistype.run)
            // You mad Vexorian?
            set data = Table.create()
        endmethod
    endstruct
endlibrary

Latest Update:
- Now using CTL and SpellEffectEvent
- Now much faster
- Extremely readable
- Did I mention it's faster?

Keywords:
Nova, Ice, Frost, Zero, Below, Sub, Sub-zero, Subzero, Sub zero, Cold, Frost Nova, Ice Nova, Below Zero, Magtheridon96, vJASS.
Contents

Sub Zero (Map)

Reviews
19 October 2011 Bribe: Another great spell, well-made, but you need to link to the required libraries (for your other spells as well).

Moderator

M

Moderator

19 October 2011
Bribe: Another great spell, well-made, but you need to link to the required libraries (for your other spells as well).
 
oh and btw, since i forgot to post the trigger, here goes:

  • Below Zero
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Below Zero
    • Actions
      • -------- ----------------- --------
      • -------- Declare Variables --------
      • -------- ----------------- --------
      • Set BZ_Caster = (Triggering unit)
      • Set BZ_Owner = (Owner of BZ_Caster)
      • Set BZ_Ability_Level = (Level of (Ability being cast) for BZ_Caster)
      • Set BZ_Facing = (Facing of BZ_Caster)
      • Set BZ_Location = (Position of BZ_Caster)
      • Set BZ_Location_2 = (Target point of ability being cast)
      • Set BZ_Total_Filament_Count = (5 x BZ_Ability_Level)
      • Set BZ_Dummy_Ability = Below Zero (dummy)
      • -------- ----------------- --------
      • -------- Initial Dummy --------
      • -------- ----------------- --------
      • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit - Add BZ_Dummy_Ability to (Last created unit)
      • Unit - Set level of BZ_Dummy_Ability for (Last created unit) to BZ_Ability_Level
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of BZ_Caster) offset by 50.00 towards BZ_Facing degrees)
      • -------- ----------------- --------
      • -------- Every other dummy --------
      • -------- ----------------- --------
      • For each (Integer A) from 1 to (BZ_Total_Filament_Count - 1), do (Actions)
        • Loop - Actions
          • -------- ----------------- --------
          • -------- Creates 2 dummies for time management and efficiency --------
          • -------- ----------------- --------
          • Set BZ_Loop_Location = (BZ_Location offset by 50.00 towards (BZ_Facing + ((360.00 / (Real(BZ_Total_Filament_Count))) x (Real((Integer A))))) degrees)
          • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add BZ_Dummy_Ability to (Last created unit)
          • Unit - Set level of BZ_Dummy_Ability for (Last created unit) to BZ_Ability_Level
          • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm BZ_Loop_Location
          • Set BZ_Loop_Location2 = (BZ_Location offset by 50.00 towards (BZ_Facing - ((360.00 / (Real(BZ_Total_Filament_Count))) x (Real((Integer A))))) degrees)
          • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add BZ_Dummy_Ability to (Last created unit)
          • Unit - Set level of BZ_Dummy_Ability for (Last created unit) to BZ_Ability_Level
          • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm BZ_Loop_Location2
          • -------- ----------------- --------
          • -------- Removing Leaks --------
          • -------- ----------------- --------
          • Custom script: call RemoveLocation(udg_BZ_Loop_Location)
          • Custom script: call RemoveLocation(udg_BZ_Loop_Location2)
      • -------- ----------------- --------
      • -------- Removing Leaks --------
      • -------- ----------------- --------
      • Custom script: call RemoveLocation(udg_BZ_Location)
      • Custom script: call RemoveLocation(udg_BZ_Location_2)
:thumbs_up: I guarentee there are no bugs here :thumbs_up:
 
thanks anyways. i only put the import because he goes soooooo well with the spell. And 88WaRCraFT3, yes... i actually read ur comment and did something about it 3) :p

Bel0lyn:
I'll fix that and all the other leaks asap. :)


One more thing: if u change the missle art of the dummy spell, you can make ANY nova spell.

Since i dont want to double post :/
here's the trigger:

  • Below Zero
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Below Zero
    • Actions
      • -------- ----------------- --------
      • -------- Declare Variables --------
      • -------- ----------------- --------
      • Set BZ_Caster = (Triggering unit)
      • Set BZ_Owner = (Owner of BZ_Caster)
      • Set BZ_Ability_Level = (Level of (Ability being cast) for BZ_Caster)
      • Set BZ_Facing = (Facing of BZ_Caster)
      • Set BZ_Location = (Position of BZ_Caster)
      • Set BZ_Location_2 = (Target point of ability being cast)
      • Set BZ_Total_Filament_Count = (5 x BZ_Ability_Level)
      • Set BZ_Dummy_Ability = Below Zero (dummy)
      • -------- ----------------- --------
      • -------- Initial Dummy --------
      • -------- ----------------- --------
      • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
      • Set BZ_Dummy = (Last created unit)
      • Unit - Add a 1.50 second Generic expiration timer to BZ_Dummy
      • Unit - Add BZ_Dummy_Ability to BZ_Dummy
      • Unit - Set level of BZ_Dummy_Ability for BZ_Dummy to BZ_Ability_Level
      • Unit - Order BZ_Dummy to Undead Dreadlord - Carrion Swarm ((Position of BZ_Caster) offset by 50.00 towards BZ_Facing degrees)
      • -------- ----------------- --------
      • -------- Every other dummy --------
      • -------- ----------------- --------
      • For each (Integer A) from 1 to (BZ_Total_Filament_Count - 1), do (Actions)
        • Loop - Actions
          • -------- ----------------- --------
          • -------- Creates 2 dummies for time management and efficiency --------
          • -------- ----------------- --------
          • Set BZ_Loop_Location = (BZ_Location offset by 50.00 towards (BZ_Facing + ((360.00 / (Real(BZ_Total_Filament_Count))) x (Real((Integer A))))) degrees)
          • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
          • Set BZ_Dummy = (Last created unit)
          • Unit - Add a 1.50 second Generic expiration timer to BZ_Dummy
          • Unit - Add BZ_Dummy_Ability to BZ_Dummy
          • Unit - Set level of BZ_Dummy_Ability for BZ_Dummy to BZ_Ability_Level
          • Unit - Order BZ_Dummy to Undead Dreadlord - Carrion Swarm BZ_Loop_Location
          • Set BZ_Loop_Location2 = (BZ_Location offset by 50.00 towards (BZ_Facing - ((360.00 / (Real(BZ_Total_Filament_Count))) x (Real((Integer A))))) degrees)
          • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
          • Set BZ_Dummy = (Last created unit)
          • Unit - Add a 1.50 second Generic expiration timer to BZ_Dummy
          • Unit - Add BZ_Dummy_Ability to BZ_Dummy
          • Unit - Set level of BZ_Dummy_Ability for BZ_Dummy to BZ_Ability_Level
          • Unit - Order BZ_Dummy to Undead Dreadlord - Carrion Swarm BZ_Loop_Location2
          • -------- ----------------- --------
          • -------- Removing Leaks --------
          • -------- ----------------- --------
          • Custom script: call RemoveLocation(udg_BZ_Loop_Location)
          • Custom script: call RemoveLocation(udg_BZ_Loop_Location2)
      • -------- ----------------- --------
      • -------- Removing Leaks --------
      • -------- ----------------- --------
      • Custom script: call RemoveLocation(udg_BZ_Location)
      • Custom script: call RemoveLocation(udg_BZ_Location_2)
anything wrong now?
 
Last edited:
Level 8
Joined
Jun 30, 2010
Messages
259
thanks anyways. i only put the import because he goes soooooo well with the spell. And 88WaRCraFT3, yes... i actually read ur comment and did something about it 3) :p

Bel0lyn:
I'll fix that and all the other leaks asap. :)


One more thing: if u change the missle art of the dummy spell, you can make ANY nova spell.

Since i dont want to double post :/
here's the trigger:

  • Below Zero
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Below Zero
    • Actions
      • -------- ----------------- --------
      • -------- Declare Variables --------
      • -------- ----------------- --------
      • Set BZ_Caster = (Triggering unit)
      • Set BZ_Owner = (Owner of BZ_Caster)
      • Set BZ_Ability_Level = (Level of (Ability being cast) for BZ_Caster)
      • Set BZ_Facing = (Facing of BZ_Caster)
      • Set BZ_Location = (Position of BZ_Caster)
      • Set BZ_Location_2 = (Target point of ability being cast)
      • Set BZ_Total_Filament_Count = (5 x BZ_Ability_Level)
      • Set BZ_Dummy_Ability = Below Zero (dummy)
      • -------- ----------------- --------
      • -------- Initial Dummy --------
      • -------- ----------------- --------
      • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
      • Set BZ_Dummy = (Last created unit)
      • Unit - Add a 1.50 second Generic expiration timer to BZ_Dummy
      • Unit - Add BZ_Dummy_Ability to BZ_Dummy
      • Unit - Set level of BZ_Dummy_Ability for BZ_Dummy to BZ_Ability_Level
      • Unit - Order BZ_Dummy to Undead Dreadlord - Carrion Swarm ((Position of BZ_Caster) offset by 50.00 towards BZ_Facing degrees)
      • -------- ----------------- --------
      • -------- Every other dummy --------
      • -------- ----------------- --------
      • For each (Integer A) from 1 to (BZ_Total_Filament_Count - 1), do (Actions)
        • Loop - Actions
          • -------- ----------------- --------
          • -------- Creates 2 dummies for time management and efficiency --------
          • -------- ----------------- --------
          • Set BZ_Loop_Location = (BZ_Location offset by 50.00 towards (BZ_Facing + ((360.00 / (Real(BZ_Total_Filament_Count))) x (Real((Integer A))))) degrees)
          • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
          • Set BZ_Dummy = (Last created unit)
          • Unit - Add a 1.50 second Generic expiration timer to BZ_Dummy
          • Unit - Add BZ_Dummy_Ability to BZ_Dummy
          • Unit - Set level of BZ_Dummy_Ability for BZ_Dummy to BZ_Ability_Level
          • Unit - Order BZ_Dummy to Undead Dreadlord - Carrion Swarm BZ_Loop_Location
          • Set BZ_Loop_Location2 = (BZ_Location offset by 50.00 towards (BZ_Facing - ((360.00 / (Real(BZ_Total_Filament_Count))) x (Real((Integer A))))) degrees)
          • Unit - Create 1 Dummy for BZ_Owner at BZ_Location facing Default building facing degrees
          • Set BZ_Dummy = (Last created unit)
          • Unit - Add a 1.50 second Generic expiration timer to BZ_Dummy
          • Unit - Add BZ_Dummy_Ability to BZ_Dummy
          • Unit - Set level of BZ_Dummy_Ability for BZ_Dummy to BZ_Ability_Level
          • Unit - Order BZ_Dummy to Undead Dreadlord - Carrion Swarm BZ_Loop_Location2
          • -------- ----------------- --------
          • -------- Removing Leaks --------
          • -------- ----------------- --------
          • Custom script: call RemoveLocation(udg_BZ_Loop_Location)
          • Custom script: call RemoveLocation(udg_BZ_Loop_Location2)
      • -------- ----------------- --------
      • -------- Removing Leaks --------
      • -------- ----------------- --------
      • Custom script: call RemoveLocation(udg_BZ_Location)
      • Custom script: call RemoveLocation(udg_BZ_Location_2)
anything wrong now?

Isn't it the same trigger as you posted the first time? Also, post it in a
If you can read this, then you have pressed reveal.


And it does not seem as if you have updated the screenshot.
That is, if you have removed the model.

Overall:
-Remove the model and take a new screenshot.
-Update your spell and post your triggers in the description using a Hidden tag.
-Update your overall description, at the moment it is just useless information about how great the spell is. Post a more advanced description of what it does instead.
 
Level 8
Joined
Jun 30, 2010
Messages
259
i'll do that later. 10 minutes from now :p

You have not really improved your description:

-You have not posted triggers.

-You still talk much about how great the spell is.

-You have created a horrible description of how the spell can be changed. Post this in a comment inside your triggers instead with a more easy-to-understand text.

-Link the tooltip of the spell in the description of all levels. This will give the reader a greater understanding of what the spell does.
 
Level 28
Joined
Mar 25, 2008
Messages
2,953
spells_2005_screenshot.jpg

  • Actions
    • -------- First, I declare the angle to be added each time the loop runs --------
    • Set IB_ang_add = ((Real((Level of Iceburst for (Triggering unit)))) x 3.00)
    • Set IB_tmppoint = (Position of (Triggering unit))
    • Special Effect - Create a special effect at IB_tmppoint using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
    • Set IB_tmpeff = (Last created special effect)
    • Custom script: call DestroyEffect(udg_IB_tmpeff)
    • Set IB_ang = -30.00
    • -------- Here's the loop - it creates Lv*3 units around the caster using the formula 360.00 / Lv*3 --------
    • For each (Integer A) from 1 to ((Level of Iceburst for (Triggering unit)) x 3), do (Actions)
      • Loop - Actions
        • Set IB_tmppoint2 = (IB_tmppoint offset by 100.00 towards (IB_ang + (360.00 / IB_ang_add)) degrees)
        • Set IB_tmppoint3 = (IB_tmppoint2 offset by 2500.00 towards (IB_ang + (360.00 / IB_ang_add)) degrees)
        • Unit - Create 1 ice_dummy for (Owner of (Triggering unit)) at IB_tmppoint2 facing IB_tmppoint3
        • Unit - Order (Last created unit) to Move to IB_tmppoint3
        • Einheit - Set level of ice for (Triggering unit) to (Level of Iceburst for (Triggering unit))
        • Set IB_ang = (IB_ang + (360.00 / IB_ang_add))
        • Unit - Add a 1.20 second Standard expiration timer to (Last created unit)
        • Custom script: call RemoveLocation(udg_IB_tmppoint2)
        • Custom script: call RemoveLocation(udg_IB_tmppoint3)
    • Set IB_ang = 0.00
    • Custom script: call RemoveLocation(udg_IB_tmppoint)
Your 'spell' is but an inefficient ripoff of a spell I made long ago.
http://www.hiveworkshop.com/forums/spells-569/iceburst-v1-01-a-117580/
Even more, only of the first spell trigger.
Change to Lv*5 and there you are.

At least, show some creativity :/
 
Level 37
Joined
Mar 6, 2006
Messages
9,242
@Squiggy: Sorry, but I couldn't resist:

  • Special Effect - Create a special effect at IB_tmppoint using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
  • Set IB_tmpeff = (Last created special effect)
  • Custom script: call DestroyEffect(udg_IB_tmpeff)

->

  • Special Effect - Create a special effect at IB_tmppoint using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
  • Custom script: call DestroyEffect(bj_lastCreatedEffect)
 
ahhh... so its just a nova spell based on multi carrion...

anyway, kinda hate the fact that you cannot make it such that a unit can only be hit by one carrion swarm, meaning you cannot make a nova spell with a standard damage (example is the active spell of Shiva's guard in DotA which deals 200 damage)... and you cannot even customize the damage to be like based on a hero attribute for example...
 
a much better? review...

Pros:
-Very Easy to use

Cons:
-No support for making a unit get hit only by one missile for standardized damage
-No support for custom damages
-No support for changing nova missile height
-No support for custom actions upon nova hit
-and a lot more

and I actually uploaded something like this when I joined here with a much shorter trigger (I think it was just on a thread because that was when I was just starting to learn how to trigger...)

On its current state:
I vote for Rejection

Since ur just starting to learn, I suggest that you use the Triggers section to have feedbacks on your spell tries...
 
actually, i've been triggering for 2 years now, but nothing that has to do with spell making and object manipulation. I only worked with hero arena scenarios that had only object-editor custom spells.

I'm going to fix this spell soon. I'm taking ur advice guys. I'll see what i can do to make this spell better after i finish the work on my other spells.
 
Last edited:
I haven't realized people still cared about this spell.
Yes, it has a few bugs. I'll fix them ASAP, and there is one problem i forgot to tell you guys: If you use a number of filaments (60+), the spell effect will look kind of wierd in the beginning, but in the end it will turn out awesome. Try it.

EDIT:
I updated the spell. It shouldn't bug now.
I will update it again soon, but i need like a day.
 
Last edited:
thank you pain22! And you too naitsirk for pointing out that bug.

Btw guys, i'm going to upload a much better version of this spell in 2 hours and 32 minutes, so feel free to check it out.



EDIT:

I updated the spell.
The only thing wrong with it is the description. I said "damage per filament" when i should've "damage per second".
It's ok, because i DOUBT that any of the spells downloaded here have the same descriptions/tooltips in the maps they were implemented in. SERIOUSLY!
 
Last edited:

N.O

N.O

Level 6
Joined
Feb 20, 2009
Messages
200
Squiggy this looks nothing like your spell, even to say yours looks a lot better then this, tho nice spell Magtheridon96... just need to add some customization for the community.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
you should add more conditions on this "(((Matching unit) is Magic Immune) Equal to False)) and do (Actions)"

when you create a dummy..."Last created unit" is fine

you are not destroying the unit group in the loop...use set bj_wantDestroyGroup=true

Im not at the WE at the moment but I thingk "Set BZ_Usage_Counter = (BZ_Usage_Counter - 1)" is misplaced, never tested it though...
 
o_O Is that really happening?
Hold on.
Let me check something...

Something is definitely wrong...
I'm unable to fix it right now, so... i'll fix it later. Sorry :( it's just that i'm kind of busy these days.


EDIT: I dont really get it. When i cast it, no damage is being dealt which is a real mystery to me as of now, but when you cast it, it kills everything on the map?
 
Last edited:
Level 10
Joined
Jan 24, 2009
Messages
606
If I remember correctly, the this in front of the struct vectors is not needed inside the struct, just the dot, simply like this: .VectorName
I believe its called vectors... but if not then just call it Struct Globals and what not.
But then again, I might be wrong. I mean, it is a long time since I coded anything in vJASS
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
why dont you use

library SubZero uses TimerUtils...

you spam the 'this' to much, you can use...
JASS:
set .caster = u
set .owner = GetOwningPlayer(.caster)
set .x = GetUnitX(.caster)
set .y = GetUnitY(.caster)
and so on...

EDIT: Sorry it has already been discussed above but I preffere to delete the this...maybe it's a matter of taste :)...
 
Level 37
Joined
Mar 6, 2006
Messages
9,242
The spell can cause a critical error if you cast it near map bounds and the projectiles go outside the map.

In move method you could multiply the facing with bj_DEGTORAD right away and not in Sin and Cos functions.

Also could you not combine filter and damage methods?

Shouldn't you null u in the filter method?

The dummy doesn't need invulnerability ability, it has locust.
 
Shouldn't you null u in the filter method?
I can't.
The return depends on "u", so I have to null it AFTER the return, but it wouldn't be nulled
since the return would terminate the rest of the function.

The dummy doesn't need invulnerability ability, it has locust.

When I rewrote the spell, I didn't pay attention to the Object Editor that much =P
I'll fix that ... even though it doesn't seem like a problem.

The spell can cause a critical error if you cast it near map bounds and the projectiles go outside the map.

I'll fix that.

Also could you not combine filter and damage methods?

Can you restructure that sentence? xD It has 2 possible meanings :p
 
Level 37
Joined
Mar 6, 2006
Messages
9,242
I can't.
The return depends on "u", so I have to null it AFTER the return, but it wouldn't be nulled
since the return would terminate the rest of the function.

It should still be nulled. Use if/then/else for example.

Can you restructure that sentence? xD It has 2 possible meanings :p

I mean that you might be able to combine the methods like this:
JASS:
static method filter takes nothing returns boolean
            local thistype this = TEMPDATA
            local unit u = GetFilterUnit()
            if IsUnitEnemy(u,this.owner) and GetWidgetLife(u)>0.405 and not IsUnitInGroup(u,hitunits) then
                call UnitDamageTarget(caster,u,damage,false,false,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_MAGIC,null)
                call GroupAddUnit(hitunits,u)
            endif
            set u = null
            return false
        endmethod
The you don't have to call the ForGroup in Move method.
 
Top