Spell Frozen Orb

Flare

Stops copies me!
Reaction score
662
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 ^^):
6k8flty.png

8g83rwk.png

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

  • Frozen Orb submission 4.w3x
    39.4 KB · Views: 920

waaaks!

Zinctified
Reaction score
255
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
662
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
803
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
803
>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
662
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
803
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:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top