Spellpack Hero: Frost Sage

Blackrage

Ultra Cool Member
Reaction score
25
My first spellpack-

3rd and 4th spells submitted

includes Ice Nova and Frost Diver

Ice Nova - The Frost Sage sends a huge amount of frost energy into the ground, sending shockwaves through the ground. As these shockwaves travel, they cause explosions of frost novas on the surface. Deals 100/140/180 damage and slows for 1/2/3 seconds.




screeny1jw2.png





Frost Diver - The Frost Sage shoots out a wave of energy that cause ice novas to explode while traveling to the target. Anyone in it's path will be slowed. Once it reaches it's target it explodes, dealing damage. Deals 80/160/240 damage and slows for 2/4/6 seconds.




screeny2py9.png





screeny3lh0.png




Codes:

Code:
Ice Nova
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ice Nova 
    Actions
        Set IN_Caster = (Triggering unit)
        Set IN_CasterLoc = (Position of IN_Caster)
        Set IN_NovaCount = 0
        For each (Integer A) from 1 to 36, do (Actions)
            Loop - Actions
                Special Effect - Create a special effect at (IN_CasterLoc offset by 100.00 towards ((Real((Integer A))) x 10.00) degrees) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                Special Effect - Destroy (Last created special effect)
        Trigger - Turn on Ice Nova Effect <gen>



Code:
Ice Nova Effect
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        Set IN_NovaCount = (IN_NovaCount + 1)
        For each (Integer A) from 1 to 36, do (Actions)
            Loop - Actions
                Set IN_NovaEffectPoint = (IN_CasterLoc offset by ((100.00 x (Real(IN_NovaCount))) + (100.00 x (Real(IN_NovaCount)))) towards ((Real((Integer A))) x 10.00) degrees)
                Special Effect - Create a special effect at IN_NovaEffectPoint using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Unit Group - Pick every unit in (Units within 150.00 of IN_NovaEffectPoint matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an ally of (Owner of IN_Caster)) Not equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Create 1 Dummy for (Owner of IN_Caster) at IN_NovaEffectPoint facing Default building facing degrees
                        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Ice Nova dummy  to (Last created unit)
                        Unit - Set level of Ice Nova dummy  for (Last created unit) to (Level of Ice Nova  for IN_Caster)
                        Unit - Order (Last created unit) to Undead Lich - Frost Nova (Picked unit)
                Custom script:   call RemoveLocation(udg_IN_NovaEffectPoint)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                IN_NovaCount Equal to 3
            Then - Actions
                Custom script:   set udg_IN_Caster=null
                Custom script:   call RemoveLocation(udg_IN_CasterLoc)
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing


Frost Diver -

Code:
Frost Diver
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Frost Diver 
    Actions
        Set FD_Caster = (Triggering unit)
        Set FD_CasterLoc = (Position of FD_Caster)
        Set FD_Target = (Target unit of ability being cast)
        Set FD_Angle = (Angle from FD_CasterLoc to FD_TargetLoc)
        Set FD_Distance = (Distance between FD_CasterLoc and FD_TargetLoc)
        Set FD_N = 0.00
        Set FD_Count = 1
        Trigger - Turn on Frost Diver Effect <gen>



Code:
Frost Diver Effect
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        Set FD_Count = (FD_Count + 1)
        Set FD_TargetLoc = (Position of FD_Target)
        Set FD_EffectLoc = (FD_CasterLoc offset by (80.00 x (Real(FD_Count))) towards FD_Angle degrees)
        Set FD_Angle = (Angle from FD_CasterLoc to FD_TargetLoc)
        Set FD_Distance = (Distance between FD_CasterLoc and FD_TargetLoc)
        Special Effect - Create a special effect at (FD_CasterLoc offset by (80.00 x (Real(FD_Count))) towards FD_Angle degrees) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in (Units within 150.00 of FD_EffectLoc matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an ally of (Owner of FD_Caster)) Not equal to True))) and do (Actions)
            Loop - Actions
                Unit - Create 1 Dummy for (Owner of FD_Caster) at FD_TargetLoc facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Frost Diver dummy 1  to (Last created unit)
                Unit - Set level of Frost Diver dummy 1  for (Last created unit) to (Level of Frost Diver  for FD_Caster)
                Unit - Order (Last created unit) to Undead Lich - Frost Nova (Picked unit)
        Set FD_N = (FD_N + 80.00)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FD_N Greater than or equal to FD_Distance
            Then - Actions
                Unit - Create 1 Dummy for (Owner of FD_Caster) at FD_TargetLoc facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Frost Diver dummy 1  to (Last created unit)
                Unit - Set level of Frost Diver dummy 1  for (Last created unit) to (Level of Frost Diver  for FD_Caster)
                Unit - Order (Last created unit) to Undead Lich - Frost Nova FD_Target
                Unit - Cause FD_Caster to damage FD_Target, dealing (80.00 x (Real((Level of Frost Diver  for FD_Caster)))) damage of attack type Spells and damage type Cold
                Custom script:   set udg_FD_Caster=null
                Custom script:   set udg_FD_Target=null
                Custom script:   call RemoveLocation(udg_FD_CasterLoc)
                Custom script:   call RemoveLocation(udg_FD_TargetLoc)
                Custom script:   call RemoveLocation(udg_FD_EffectLoc)
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing

Feedback please.
 

Attachments

  • [Spellpack] Frost Sage.w3x
    52.7 KB · Views: 268

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Frost Nova is Candy for my Eye!

Looks nice, I have a look at your map :)
 

Blackrage

Ultra Cool Member
Reaction score
25
yea, it doesnt lag either (except on first cast because i dont know how to preload)

I dont think theres any leaks.
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
yea, it doesnt lag either (except on first cast because i dont know how to preload)

You can preload by either importing a .pld file or using:

Code:
Custom Script:    call Preload("ModelPath.mdl")
 

vypur85

Hibernate
Reaction score
803
Eyecandy :). Almost blinded :p.

All your Unit Group leaks i think. You never set for any one of them and then remove them. For Frost Diver, i think all your locations leak. Because you've set them more than once but only remove at the end of the periodic trigger (Hope im correct about this). And does the triggering unit really need to be nulled? I dont think so, because they are all global (Not sure, im not good about this JASS thing, i just presume). You should also mention that your spells are not MUI :). Maybe posting the triggers would help :).

For the Nova, the damage isn't exactly as stated because a picked unit can be hit more than once by the Frost Nova dummy (maybe its intentional but the tooltip seems misleading but its still not a problem though). And i think the Frost Diver range should be longer. Should work better with longer range because there is hardly any units in between the caster and the target if the range is short (hope you know what i mean).

Overall, again, pain in the eyes (the explosions for Ice Nova, i mean). Cool. Very cold :p....

Repped

PS: The Nova lagged my com a little bit. Using office com :p.
 

hell_knight

Playing WoW
Reaction score
126
Seen both of these , ( or similar with different effects ) in countless spellpacks. But its a very good spell to learn from.
Post code? At school can't check atm xD
 

Sim

Forum Administrator
Staff member
Reaction score
534
How many spells in this spellpack...?

> 3rd and 4th spells submitted

Where? :confused:

> Please post code.

Quoted for truth.
 

Blackrage

Ultra Cool Member
Reaction score
25
Ill post the code right now then :p

just wait...

>For Frost Diver, i think all your locations leak. Because you've set them more than once but only remove at the end of the periodic trigger

-I think your talking about the Reals and Integers. They don't need to be removed.

>And does the triggering unit really need to be nulled? I dont think so, because they are all global (Not sure, im not good about this JASS thing

-They do need to be nulled.

>For the Nova, the damage isn't exactly as stated because a picked unit can be hit more than once by the Frost Nova dummy (maybe its intentional but the tooltip seems misleading but its still not a problem though).

-They can be hit twice i think so i made the damage in the dummy spell half of the damage in the tooltip.

>Should work better with longer range because there is hardly any units in between the caster and the target if the range is short (hope you know what i mean).


-How about 500/800/1200?

>PS: The Nova lagged my com a little bit. Using office com .

-Didnt lag for me except for first cast

>Seen both of these , ( or similar with different effects ) in countless spellpacks. But its a very good spell to learn from.
Post code? At school can't check atm xD


-yea, but mine uses special effect in the trigger and i dont think anyone did before =/

>How many spells in this spellpack...?


-2 :p



EDIT: It does lag if you cast Ice Nova a bunch of times.
 

Darkchaoself

What is this i dont even
Reaction score
106
EDIT: It does lag if you cast Ice Nova a bunch of times.

At the same time? Or just a lot of times in game?

If just over time, that my friend, is called leaks, which i will try to look over and find for you ;)

But i dont see any obvious ones, so you're good...for now :p
 

vypur85

Hibernate
Reaction score
803
>For Frost Diver, i think all your locations leak. Because you've set them more than once but only remove at the end of the periodic trigger

-I think your talking about the Reals and Integers. They don't need to be removed.

What i meant was these:
Code:
Frost Diver Effect
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        Set FD_Count = (FD_Count + 1)
[B]        Set FD_TargetLoc = (Position of FD_Target)[/B]
[B]        Set FD_EffectLoc = (FD_CasterLoc offset by (80.00 x (Real(FD_Count))) towards FD_Angle degrees)[/B]
        Set FD_Angle = (Angle from FD_CasterLoc to FD_TargetLoc)
        Set FD_Distance = (Distance between FD_CasterLoc and FD_TargetLoc)
        Special Effect - Create a special effect at (FD_CasterLoc offset by (80.00 x (Real(FD_Count))) towards FD_Angle degrees) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in (Units within 150.00 of FD_EffectLoc matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an ally of (Owner of FD_Caster)) Not equal to True))) and do (Actions)
            Loop - Actions
                Unit - Create 1 Dummy for (Owner of FD_Caster) at FD_TargetLoc facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Frost Diver dummy 1  to (Last created unit)
                Unit - Set level of Frost Diver dummy 1  for (Last created unit) to (Level of Frost Diver  for FD_Caster)
                Unit - Order (Last created unit) to Undead Lich - Frost Nova (Picked unit)
        Set FD_N = (FD_N + 80.00)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FD_N Greater than or equal to FD_Distance
            Then - Actions
                Unit - Create 1 Dummy for (Owner of FD_Caster) at FD_TargetLoc facing Default building facing degrees
                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                Unit - Add Frost Diver dummy 1  to (Last created unit)
                Unit - Set level of Frost Diver dummy 1  for (Last created unit) to (Level of Frost Diver  for FD_Caster)
                Unit - Order (Last created unit) to Undead Lich - Frost Nova FD_Target
                Unit - Cause FD_Caster to damage FD_Target, dealing (80.00 x (Real((Level of Frost Diver  for FD_Caster)))) damage of attack type Spells and damage type Cold
                Custom script:   set udg_FD_Caster=null
                Custom script:   set udg_FD_Target=null
                Custom script:   call RemoveLocation(udg_FD_CasterLoc)
[B]                Custom script:   call RemoveLocation(udg_FD_TargetLoc)[/B]
[B]                Custom script:   call RemoveLocation(udg_FD_EffectLoc)[/B]
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing
The points are created every 0.2 seconds, but you only destroyed it once when you are turning off the trigger. I might be wrong though. Correct me if i am wrong (I just used common sense, as i think it shouldnt work this way.).

>Should work better with longer range because there is hardly any units in between the caster and the target if the range is short (hope you know what i mean).


-How about 500/800/1200?
Not sure. It should depend on the gameplay and map type. But i guess 800-1400 would be good, since it only damages one unit instead of all (it balances the long range, i guess).

>PS: The Nova lagged my com a little bit. Using office com .

-Didnt lag for me except for first cast
My office com is a bit suckier :p. But there are lots of enemy units, i guess it would lag quite badly though.


You should fix your Group leaks.

Edit: Does the units really need to be nulled? Im confused.
 

Blackrage

Ultra Cool Member
Reaction score
25
At the same time? Or just a lot of times in game?

If just over time, that my friend, is called leaks, which i will try to look over and find for you ;)

But i dont see any obvious ones, so you're good...for now :p

I meant if you spam it A LOT.(I spammed like 10 times and it started getting really laggy)


@Vypur

Ill fix those and update it an a bit.

Strange.........it lags more when I fixed those leaks

Crap, Noticed This: http://www.thehelper.net/forums/showthread.php?t=49482

Aw Well, made a GUI version of Ice Nova (Can't believe I made the same name too) :nuts:
 
L

Lemonicious

Guest
T-T-T-TRIPLE POSTTTTT

can you move while frost novas goin off?

if so, will the novas move to get in the correct position or will they continue to burst with the casting point as the middle
 

Blackrage

Ultra Cool Member
Reaction score
25
There isnt Multi-Posting on this forum lemon..(i dont think there is :p)

and you can move, and yes the casting point is the center
 

Tinki3

Special Member
Reaction score
418
Cool spells :).

In the "Ice Nova" trigger:

> Special Effect - Create a special effect at (IN_CasterLoc offset by 100.00 towards ((Real((Integer A))) x 10.00) degrees)

The text in bold leaks, as it is referencing a point incorrectly.
Store "IN_CasterLoc offset by ..." into a point variable and reference that content via that variable.
That'll prevent the leak, as I'm sure you know.

_________

In the "Ice Nova Effect" trigger, the Unit Group leaks.

To prevent, simply add in a "set bj_wantDestroyGroup = true" Custom script line directly before it.

Globals variables do not need to be nulled.

"Do nothing" isn't needed, it's doing nothing anyway.
It also doesn't need to be there to fill in the empty space, the trigger will handle it.

_________

In the "Frost Diver" trigger, the lines:

> Set FD_Angle = (Angle from FD_CasterLoc to FD_TargetLoc)
> Set FD_Distance = (Distance between FD_CasterLoc and FD_TargetLoc)

are not needed because they need the other periodic trigger to work, and
aren't doing anything in the cast trigger because of this.

_________

In the "Frost Diver Effect" trigger, the Custom script lines for removing "FD_TargetLoc" and "FD_EffectLoc" need to be outside that If-Then-Else statement to prevent memory leaks.

The Unit Group leaks as well.
Add that Custom script line again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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