Spell Frozen Orb

Flare

Stops copies me!
Reaction score
664
My latest creation, a spell based on Diablo 2's Frozen Orb ability (it launches an orb of ice which launches shards of ice at rapid rate, dealing damage to anything that gets in its way)

I intended on submitting this for the Ice spell contest, but it didn't follow the rules (was originally created before the spell contest, even though it wasn't working properly)

Frozen Orb
Launches a large orb of frost, which fires chilling shards of ice around it, destroying everything in its path.



This spell is fully MUI, up to 100 instances (maximum number of instances possible with the way the spell is currently made is about 300 since there is 27 bolts fired per cast, and 8192 (max array size, isnt it?) divided by 27 will give roughly 300)

Spell is made in GUI, with small amount of JASS for leak removal

There are no leaks that I can see

There is a small bit of lag, but considering about 7 or 8+ units are being periodically moved at a time, it isn't bad (BEWARE: SPAMMING THIS SPELL 5+ TIMES BEFORE THE OTHER ORBS HAVE BEEN DESTROYED IS A VERY BAD IDEA)

Code:
Implementing:
 -Copy the 5 triggers within the Frozen Orb category
 -Copy ALL the custom units (Hidden Dummy, Bolt Dummy, Orb Dummy).
 -Copy the hero ability Frozen Orb
 -Change any necessary configurable properties (they have comments above them)
 -Add the Frozen Orb ability to your hero.
Screenshots (they are pretty damn large ^^):


Code:
Trigger:
  • FO Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Frozen Orb
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OrbCV Less than 100
        • Then - Actions
          • Set OrbCV = (OrbCV + 1)
        • Else - Actions
          • Set OrbCV = 1
      • Set Caster[OrbCV] = (Triggering unit)
      • Set CasterLoc[OrbCV] = (Position of Caster[OrbCV])
      • Set TargetPt[OrbCV] = (Target point of ability being cast)
      • Set InitAngle[OrbCV] = (Angle from TargetPt[OrbCV] to CasterLoc[OrbCV])
      • Unit - Create 1 Orb Dummy for (Owner of Caster[OrbCV]) at CasterLoc[OrbCV] facing (InitAngle[OrbCV] - 180.00) degrees
      • Unit - Set the custom value of (Last created unit) to OrbCV
      • Set OrbDummy[OrbCV] = (Last created unit)
      • -------- Orb damage configuration --------
      • Set OrbDamage[OrbCV] = ((Random real number between 18.00 and 40.00) + ((Random real number between 10.00 and 15.00) x (Real((Level of Frozen Orb for Caster[OrbCV])))))
      • Unit Group - Add (Last created unit) to OrbGroup
      • Set OrbDist[OrbCV] = 0.00
      • Trigger - Add to FO orb damage <gen> the event (Unit - A unit comes within 100.00 of OrbDummy[OrbCV])
      • Custom script: call RemoveLocation (udg_CasterLoc[udg_OrbCV])
      • Custom script: call RemoveLocation (udg_TargetPt[udg_OrbCV])


Trigger:
  • FO movement
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Number of units in BoltGroup) Greater than 0
          • (Number of units in OrbGroup) Greater than 0
    • Actions
      • Unit Group - Pick every unit in OrbGroup and do (Actions)
        • Loop - Actions
          • Set OrbLoc[(Custom value of (Picked unit))] = (Position of (Picked unit))
          • -------- Orb speed configuration --------
          • Set NewOrbLoc[(Custom value of (Picked unit))] = (OrbLoc[(Custom value of (Picked unit))] offset by 20.00 towards (InitAngle[(Custom value of (Picked unit))] - 180.00) degrees)
          • Unit - Move (Picked unit) instantly to NewOrbLoc[(Custom value of (Picked unit))]
          • Unit - Create 1 Hidden Dummy for (Owner of (Picked unit)) at NewOrbLoc[(Custom value of (Picked unit))] facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to (Custom value of (Picked unit))
          • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
          • Unit Group - Pick every unit in OrbDamageGroup and do (Actions)
            • Loop - Actions
              • -------- This is where the damage for the orb occurs --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True
                • Then - Actions
                  • Unit - Cause OrbDummy[(Custom value of (Last created unit))] to damage (Picked unit), dealing OrbDamage[(Custom value of (Last created unit))] damage of attack type Spells and damage type Normal
                  • Floating Text - Create floating text that reads ((String((Integer(OrbDamage[(Custom value of (Last created unit))])))) + !) above (Picked unit) with Z offset 0.00, using font size 9.00, color (0.00%, 0.00%, 100.00%), and 30.00% transparency
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • -------- Orb damage text floats down --------
                  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 270.00 degrees
                  • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                  • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
                  • -------- Damage is randomized everytime a unit is hit --------
                  • Set OrbDamage[(Custom value of (Picked unit))] = ((Random real number between 18.00 and 40.00) + ((Random real number between 10.00 and 15.00) x (Real((Level of Frozen Orb for Caster[(Custom value of (Picked unit))])))))
                  • Unit Group - Remove (Picked unit) from OrbDamageGroup
                • Else - Actions
                  • Unit Group - Remove (Picked unit) from OrbDamageGroup
          • -------- This counts how long the orb has been alive --------
          • Set OrbDist[(Custom value of (Picked unit))] = (OrbDist[(Custom value of (Picked unit))] + 0.04)
          • -------- This is the maximum lifetime of the orb (ignore the variable name) --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OrbDist[(Custom value of (Picked unit))] Greater than or equal to 2.50
            • Then - Actions
              • Unit Group - Remove (Picked unit) from OrbGroup
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
          • Custom script: call RemoveLocation (udg_OrbLoc[GetUnitUserData(GetEnumUnit())])
          • Custom script: call RemoveLocation (udg_NewOrbLoc[GetUnitUserData(GetEnumUnit())])
      • Unit Group - Pick every unit in BoltGroup and do (Actions)
        • Loop - Actions
          • Set BoltLoc[(Custom value of (Picked unit))] = (Position of (Picked unit))
          • -------- Bolt speed configuration --------
          • Set NewBoltLoc[(Custom value of (Picked unit))] = (BoltLoc[(Custom value of (Picked unit))] offset by 25.00 towards (Facing of (Picked unit)) degrees)
          • Unit - Move (Picked unit) instantly to NewBoltLoc[(Custom value of (Picked unit))]
          • Unit - Create 1 Hidden Dummy for (Owner of (Picked unit)) at NewBoltLoc[(Custom value of (Picked unit))] facing Default building facing degrees
          • Unit - Set the custom value of (Last created unit) to (Custom value of (Picked unit))
          • Unit - Add a 0.01 second Generic expiration timer to (Last created unit)
          • Unit Group - Pick every unit in BoltDamageGroup and do (Actions)
            • Loop - Actions
              • -------- This is where bolt damage occurs --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of (Last created unit))) Equal to True
                • Then - Actions
                  • Unit - Cause BoltDummy[(Custom value of (Last created unit))] to damage (Picked unit), dealing BoltDamage[(Custom value of (Last created unit))] damage of attack type Spells and damage type Normal
                  • Floating Text - Create floating text that reads ((String((Integer(BoltDamage[(Custom value of (Last created unit))])))) + !) above (Picked unit) with Z offset 0.00, using font size 7.00, color (40.00%, 30.00%, 70.00%), and 0.00% transparency
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • -------- Bolt damage text floats up --------
                  • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                  • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • -------- Bolt damage is randomized after a unit is hit --------
                  • Set BoltDamage[(Custom value of (Last created unit))] = ((Random real number between 1.00 and 17.00) + ((Random real number between 5.00 and 10.00) x (Real((Level of Frozen Orb for Caster[(Custom value of (Picked unit))])))))
                  • Unit Group - Remove (Picked unit) from BoltDamageGroup
                • Else - Actions
                  • Unit Group - Remove (Picked unit) from BoltDamageGroup
          • -------- This counts how long the bolt has been alive for --------
          • Set BoltDist[(Custom value of (Picked unit))] = (BoltDist[(Custom value of (Picked unit))] + 0.04)
          • -------- This determines how long the bolt will live --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BoltDist[(Custom value of (Picked unit))] Greater than or equal to 0.75
            • Then - Actions
              • Unit Group - Remove (Picked unit) from BoltGroup
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
          • Custom script: call RemoveLocation (udg_BoltLoc[GetUnitUserData(GetEnumUnit())])
          • Custom script: call RemoveLocation (udg_NewBoltLoc[GetUnitUserData(GetEnumUnit())])


Trigger:
  • FO boltspawn
    • Events
      • Time - Every 0.11 seconds of game time
    • Conditions
      • (Number of units in OrbGroup) Greater than 0
    • Actions
      • Unit Group - Pick every unit in OrbGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BoltCV Less than 2700
            • Then - Actions
              • Set BoltCV = (BoltCV + 1)
            • Else - Actions
              • Set BoltCV = 1
          • Set OrbLoc[(Custom value of (Picked unit))] = (Position of (Picked unit))
          • -------- The angle at which each ice bolt will fly --------
          • Set SpawnAngle[(Custom value of (Picked unit))] = (SpawnAngle[(Custom value of (Picked unit))] + 40.00)
          • Unit - Create 1 Bolt Dummy for (Owner of (Picked unit)) at OrbLoc[(Custom value of (Picked unit))] facing SpawnAngle[(Custom value of (Picked unit))] degrees
          • Unit - Set the custom value of (Last created unit) to BoltCV
          • Unit Group - Add (Last created unit) to BoltGroup
          • Set BoltDummy[(Custom value of (Last created unit))] = (Last created unit)
          • -------- Bolt damage configuration --------
          • Set BoltDamage[(Custom value of (Last created unit))] = ((Random real number between 1.00 and 17.00) + ((Random real number between 5.00 and 10.00) x (Real((Level of Frozen Orb for Caster[(Custom value of (Picked unit))])))))
          • Set BoltDist[BoltCV] = 0.00
          • Trigger - Add to FO bolt damage <gen> the event (Unit - A unit comes within 100.00 of BoltDummy[BoltCV])
          • Custom script: call RemoveLocation (udg_OrbLoc[GetUnitUserData(GetEnumUnit())])
          • Custom script: call RemoveLocation (udg_NewOrbLoc[GetUnitUserData(GetEnumUnit())])


Trigger:
  • FO orb damage
    • Events
    • Conditions
    • Actions
      • -------- All the damage dealt is dealt with in the movement trigger --------
      • Unit Group - Add (Triggering unit) to OrbDamageGroup


Trigger:
  • FO bolt damage
    • Events
    • Conditions
    • Actions
      • -------- All the damage dealt is dealt with in the movement trigger --------
      • Unit Group - Add (Triggering unit) to BoltDamageGroup


Please leave feedback, bug reports and suggestions.

If you are going to use this spell in your map, please give me credit

Officially approved as of 3rd Jan 2008 ^^ (my second approved spell, and my final GUI spell)

HUGE UPDATE!
I've reworked the damage triggers, so that potential bug about ownership of damaging unit will NOT occur. I've also removed all instances of (Custom Value of (Picked Unit)) and replaced it with tempint.

The spell should now be safe when repeatedly cast.
 

Attachments

waaaks!

Zinctified
Reaction score
256
ok this is usefull for GUI users
now i found 3 spells with this kind of category
2 are jass and 1 is gui

good job
 

denmax

You can change this now in User CP.
Reaction score
155
I forgot about Diablo II now but I just gotta ask something,

Does Frozen Orb work this way? Creates shards of frost that is constant in its direction of fire? (look, it starts at the back part ALWAYS(?))
 

0zaru

Learning vJASS ;)
Reaction score
60
Wow i never played diablo 2, and i was going to do a spell like this for the spell contest o_O
 

Flare

Stops copies me!
Reaction score
664
I haven't played Diablo 2 in a LONG time (without mods that is), and I'm 99% sure that the firing pattern is random but two things:

A) I never said it was exactly like the Diablo 2 ability, I just said that it was based on it

B) I personally prefer a... regular (if that's the correct word for it) launching angle for the bolts

lol 0zaru, poke out your eyes now before you see the code, or someone is gonna call it 'help' ^^
 

0zaru

Learning vJASS ;)
Reaction score
60
Nah, i have most of the code made, but now i have to add some things more to make it different from other spells ... :p. Anyway mine is in JASS so the judges will know that i made it by myselft =P
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
wow realy nice job though i didn't check but if i remember right it shoots in all directions randomlly but not totally like it shoots in a certain precent to everywhere but it's balanced to all sides in the game (i think)
anyway good job (+Rep)
 
M

mc117

Guest
For some reason your map isn't working for me, it just launched a icicle towards the point i target and thats it.
 

vypur85

Hibernate
Reaction score
804
For some reason your map isn't working for me, it just launched a icicle towards the point i target and thats it.
The first trigger is disabled. Open using WE and enable then test it. (Why is it disabled anyway?). Cool spell. Complicated triggering :p.

BEWARE: SPAMMING THIS SPELL 5+ TIMES BEFORE THE OTHER ORBS HAVE BEEN DESTROYED IS A VERY BAD IDEA
I tried it :p. The floating text seems very confusing if there are a lot of units. Instead of having the floating text, why not create some icy SFX on the affected unit? (Not sure its a good idea though, and not sure whether it lags or not that way).
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
vypur85 said:
why not create some icy SFX on the affected unit? (Not sure its a good idea though, and not sure whether it lags or not that way).
Reply With Quote
i thought about it too but how would he detect when the unit comes within the icicle?
 

vypur85

Hibernate
Reaction score
804
>i thought about it too but how would he detect when the unit comes within the icicle?

Not sure. But he could create floating above the affected unit, so maybe its possible to create SFX at that particular point. I've not read the triggers (too complicated, or maybe too much things to look at) so im really unsure whether the SFX can be done or not. (But i still think it is possible :p).
 

Flare

Stops copies me!
Reaction score
664
thx for the pointing out the disabled trigger ^^ i forgot to re-enable it after getting a custom script wrong (said OrbCV instead of udg_OrbCV when destroying casters location :p)

as regards creating an sfx, what sfx could i use? frost nova would cause lag in the current situation (mass peasants bundled on each other ^^), freezing breath wud be a big ugly, and i dnt kno if there is any small sfx suitable for it

OK, I fixed the disabled trigger and its now uploaded.

i thought about it too but how would he detect when the unit comes within the icicle?
what exactly do you mean by that?

Complicated triggering
its not THAT complicated, its just the fact that everything bar the icicle spawn is dealt with in that trigger :S. if i moved the damage from FO movement to Orb damage or Bolt damage, it wouldve taken a significant chunk out of the FO movement trigger, but wouldve been too much trouble, since i would have to detect which bolt came within range of the unit. and, in the end, the movement trigger is just 2 very similar unit group loops ^^
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
what exactly do you mean by that?
i mean if you try doing that with an SFX like getting a dummy to cast something that will throw the icicle but that wouldn't work unless the target of the dummy is a unit since you cannot detect like that if they came across each other (the target and the effect)
 

vypur85

Hibernate
Reaction score
804
as regards creating an sfx, what sfx could i use?
Just a suggestion. What about the 'Unit Missile - Frost Wyrm....' SFX? Seems cool enough :p. Not sure it will lag or not but, if it does then you could try out with other icy missile SFX and see if its nice or not. Or else, just stick with your current one will do :). (But i still feel that the floating text is kinda useless because if there are too many units then there is no point of looking at the values anymore).
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I have a bunch of community service I have to do, and I have a feeling there will be a lot of snow shoveling involved now
  • The Helper The Helper:
    don't know why people choose to live in that kind of weather :)
  • Varine Varine:
    Well
  • Varine Varine:
    My job is here
  • Varine Varine:
    I was born here man I didn't choose shit
  • Varine Varine:
    And also, I keep moving away and it doesn't get any better. I moved to San Antonio and shit froze there AND we had blackouts
  • tom_mai78101 tom_mai78101:
    I'm back, suffering from severe jet lag.
  • The Helper The Helper:
    Cold is following your ass around Varine - I just dont think I could handle a snowy winter.
  • The Helper The Helper:
    Welcome Back Tom!
  • The Helper The Helper:
    I hear that taking a Melatonin around your normal bedtime can really fix jet lag
  • tom_mai78101 tom_mai78101:
    Yeah, I also heard about that as well. I think I'm good. I'm just lucky it's the weekend so I have some time to readjust.
    +1
  • Varine Varine:
    It was a fucking blizzard today, shoveling was an effort in futility.
  • Varine Varine:
    Melatonin gives me nightmares
  • Varine Varine:
    They had me shoveling out the parking lot for the jail. Fucking pointless, they need a blow.
  • Varine Varine:
    Well they gave me a snow blower but it was too wet to do much with with other than compact everything. Oh well, the cop cars can get into there now when they arrest people I guess
    +1
  • The Helper The Helper:
    I shit you not we are Number one on Google for Banana Bread Recipe
  • jonas jonas:
    xD
    +1
  • The Helper The Helper:
    Need Web Design Contractor that knows Word Press, Woocommerce and Elementor to help with the company that sponsors this site
  • The Helper The Helper:
  • The Helper The Helper:
    I am going to be AFK most of this weekend has I have a friend coming into town for his company christmas party and I am going to be busy with that this weekend.
    +1
  • The Helper The Helper:
    541 Active Users and this number has been pretty steady give or take some. The bots are hammering us.
  • The Helper The Helper:
    I have been posting a bunch of recipes and Google is loving them. I mean OK my shit is good but how does google know LOL!

    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