Chain Frost - DotA spell

Silvenon

New Member
Reaction score
19
Here's the code:

Code:
Chain Frost
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Chain Frost
    Actions
        Set ChainFrostCaster = (Casting unit)
        Set ChainFrostTarget = (Target unit of ability being cast)
        Set ChainFrostPosition = (Position of ChainFrostTarget)
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of ChainFrostCaster) facing Default building facing degrees
        Unit - Add Frost Missile* to (Last created unit)
        Unit - Set level of Shadow Strike for (Last created unit) to (Level of Chain Frost for ChainFrostCaster)
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb ChainFrostTarget
        Wait ((Distance between (Position of (Last created unit)) and (Position of ChainFrostTarget)) / 300.00) seconds
        Special Effect - Create a special effect at ChainFrostPosition using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of ChainFrostTarget) facing Default building facing degrees
        Unit - Add Frost Missile to (Last created unit)
        Unit - Set level of Shadow Strike for (Last created unit) to (Level of Chain Frost for ChainFrostCaster)
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Set ChainFrostTarget = (Random unit from (Units within 500.00 of (Position of ChainFrostTarget) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)
        Set ChainFrostPosition = (Position of ChainFrostTarget)
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb ChainFrostTarget
        Wait ((Distance between (Position of (Last created unit)) and (Position of ChainFrostTarget)) / 300.00) seconds
        Special Effect - Create a special effect at ChainFrostPosition using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of ChainFrostTarget) facing Default building facing degrees
        Unit - Add Frost Missile to (Last created unit)
        Unit - Set level of Shadow Strike for (Last created unit) to (Level of Chain Frost for ChainFrostCaster)
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Set ChainFrostTarget = (Random unit from (Units within 500.00 of (Position of ChainFrostTarget) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)
        Set ChainFrostPosition = (Position of ChainFrostTarget)
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb ChainFrostTarget
        Wait ((Distance between (Position of (Last created unit)) and (Position of ChainFrostTarget)) / 300.00) seconds
        Special Effect - Create a special effect at ChainFrostPosition using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of ChainFrostTarget) facing Default building facing degrees
        Unit - Add Frost Missile to (Last created unit)
        Unit - Set level of Shadow Strike for (Last created unit) to (Level of Chain Frost for ChainFrostCaster)
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Set ChainFrostTarget = (Random unit from (Units within 500.00 of (Position of ChainFrostTarget) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)
        Set ChainFrostPosition = (Position of ChainFrostTarget)
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb ChainFrostTarget
        Wait ((Distance between (Position of (Last created unit)) and (Position of ChainFrostTarget)) / 300.00) seconds
        Special Effect - Create a special effect at ChainFrostPosition using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of ChainFrostTarget) facing Default building facing degrees
        Unit - Add Frost Missile to (Last created unit)
        Unit - Set level of Shadow Strike for (Last created unit) to (Level of Chain Frost for ChainFrostCaster)
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Set ChainFrostTarget = (Random unit from (Units within 500.00 of (Position of ChainFrostTarget) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)
        Set ChainFrostPosition = (Position of ChainFrostTarget)
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb ChainFrostTarget
        Wait ((Distance between (Position of (Last created unit)) and (Position of ChainFrostTarget)) / 300.00) seconds
        Special Effect - Create a special effect at ChainFrostPosition using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of ChainFrostTarget) facing Default building facing degrees
        Unit - Add Frost Missile to (Last created unit)
        Unit - Set level of Shadow Strike for (Last created unit) to (Level of Chain Frost for ChainFrostCaster)
        Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
        Set ChainFrostTarget = (Random unit from (Units within 500.00 of (Position of ChainFrostTarget) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)
        Set ChainFrostPosition = (Position of ChainFrostTarget)
        Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb ChainFrostTarget
        Wait ((Distance between (Position of (Last created unit)) and (Position of ChainFrostTarget)) / 300.00) seconds
        Special Effect - Create a special effect at ChainFrostPosition using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl

*Frost Missile: (based on Acid Bomb)

Art - Missile Arc - 0.00 (what is missile arc anyway?)
Art - Missile Art - Frost Whyrm Missile
Art - Missile Speed - 300
Art - Missile Homing Enabled - False
Stats - Hero Ability - False
Level 1, 2, 3 - Data - Armor Penalty - 0
Level 1, 2, 3 - Data - Damage Interval - 0
Level 1 - Data - Primary Damage - 280.00
Level 2 - Data - Primary Damage - 370.00
Level 3 - Data - Primary Damage - 460.00
Level 1, 2, 3 - Data - Secondary Damage - 0.00
And few other stuff.............

When it hits still targets it works, but with moving targets sometimes the missile splits in two or goes away for no reason!

Can anyone fix this? Sorry about the long code.......
 

Tinki3

Special Member
Reaction score
418
"Set ChainFrostPosition = (Position of ChainFrostTarget)"

This will be what you are refering to as your problem.

Say you use chain frost on this unit. The projectile is halfway towards hitting the target, then, the target blinks 500 units away.

But hang on, our projectile isn't going to go another 500 units to find that target; its going to wait until it is close enough to "ChainFrostPosition", which was set before the target blinks away..

See where I'm coming from? An easier way of doing this trigger would be to change the wait line you have to "wait until" the Target Unit has the buff units gain, after they have been hit by each "chain". In your case, Acid Bomb (this will "half" fix your trigger. To fix the other half, set the target's position after the wait line, then create the next dummy there).

So, to fix the trigger, you can either add "frost missile" to the caster, and make that the main ability that's cast, and then change the wait function into a "wait for condition" function ("wait until unit has buff" is a good one to use), then, after the target has the buff, create a dummy at the target location, then pick a random unit, then order the dummy to do its thing.. etc.. etc..

By waiting for a condition, you can check that the target has a buff every 0.1 seconds, so its farily accurate.

Basically, you need to set the target's position after the wait line. And change the wait to a "wait until" function.

That should do it.

OR

You could look at my Chain Storm Bolt spell, and see how that's done to give you an idea.
 

hell_knight

Playing WoW
Reaction score
126
Do a loop instead of all that?

Anyway, pretty cool and simple.

_________________________________________________________________
You can stop me from having a signature, but you cannot stop me from putting this at the end of every post.
Sig.jpg

I am WrathOfSven on DotA forums, and I play clan TDA.
I do spell requests just give a PM!
 

Silvenon

New Member
Reaction score
19
I tried to do loop with Integer A, but I don't know how wait actions work there.......the only reason I used ChainFrostPosition is because of the nova effect, can I put it in the spell in the object editor? (Art - Special maybe)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top