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: 966
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
 
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(?))
 
Wow i never played diablo 2, and i was going to do a spell like this for the spell contest o_O
 
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' ^^
 
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
 
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)
 
For some reason your map isn't working for me, it just launched a icicle towards the point i target and thats it.
 
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).
 
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?
 
>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).
 
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 ^^
 
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)
 
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.
  • Ghan Ghan:
    But the electorate would have to demand it and vote people in to do it.
  • Ghan Ghan:
    Government spending, foreign policy, and the southern border are all bigger issues than the income tax right now I'd say.
  • The Helper The Helper:
    For you those are the bigger issues. Cannabis legalization and get rid of Income tax are mine.
  • Ghan Ghan:
    We have so much cannabis up here in Oklahoma. Can't go a block without running into 3 dispensaries. xD
  • The Helper The Helper:
    if the demand is there
  • jonas jonas:
    I think the biggest issue in USA is how divided the country has become
  • Ghan Ghan:
    There's a big split happening in fundamental values that is very worrisome.
  • jonas jonas:
    I think there's always been a split in values. But now there's a split in what reality is. No matter whom you ask, they think a third of the country is insane and wants to destroy the country
  • The Helper The Helper:
    pretty big split
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
    +1
  • The Helper The Helper:
    Dont forget to check out the list of all the recipes on the site at the Recipe Index - I am about to take Ghan up on the offer of making that a site :) https://www.thehelper.net/threads/main-recipes-menu-recipes-index-version-2-0.189517/
  • The Helper The Helper:
    We should add that as part of site navigation
  • Varine Varine:
    I just don't think Trump actually understands how the government works. I'm not going to pretend like I can understand the entirety of government but in my industry he kind of caused massive fucking issues. Tarriffs and the international counters had a pretty significant impact on what I do, it was actually kind of interesting to see though. I live in Idaho so I'm not really concerned with it, it'll be R pretty much the entire way down. We do have ranked choice on our ballot this year though and I DO really care about that. But if we are going to have a federal government we kind of need income tax. They could abolish it and tax states I guess, but then states are just going to raise income taxes. It's not really viable without a very significant and holistic overhaul of how the federal government works, and that isn't something I would expect Trump to do.
  • Varine Varine:
    I don't expect Harris to do it either. I want to see wealth and church taxes, but those also aren't things I'm going to hold my breath for.
  • jonas jonas:
    I mean he definitely doesn't, which is why he had to retract most of his executive orders, didn't manage to get rid of obamacare etc.
  • jonas jonas:
    B
  • jonas jonas:
    Replacing income tax with a wealth tax would be amazing imho, but I can't even imagine that this would happend
  • Ghan Ghan:
    Wealth tax would be a disaster. Imagine having to liquidate retirement accounts because you have a tax bill just for unrealized gains. Or your house goes up in price and you have to sell it to pay the tax bill.
  • jonas jonas:
    I'm not talking about an income tax on wealth gain.
  • jonas jonas:
    we already have a wealth tax on our house, it's called a property tax. I'm talking about extending that to other income-generating assets like private equity, bonds and stocks.
  • jonas jonas:
    I agree that the effect of that would be to depress asset prices, but I think that's a good thing. Makes it easier for hard working young people to grow their retirement income
    +1
  • seph ir oth seph ir oth:
    Potential problem for a wealth tax for the US would be the ultra rich just offshoring assets in another country without a wealth tax. Those that would eat the wealth tax on, say, stocks, would be the middle class that puts money slowly into the market via the likes of funds.
  • seph ir oth seph ir oth:
    happy US election day btw!
  • Varine Varine:
    Oh election day

      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