• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Agile v1.2.1

===========================================================================
Hello,
Here's a simple MUI spell for everyone. This increases the agility of a hero for a period of time.
At the start of the spell, a percentage of the given amount of agility damages the sorounding melee units around the casting hero.
Copy the triggers and the variables into your map.
Do not forget to give credits to me if you use this in your map.

Thanks you,

eubz.
============================================================================

closed

Configuration

Casting Triggers

Loop Trigger

  • AgileConfig
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- You can modify the integers here --------
      • -------- To get how much time is used for the spell, multiply RTime by the level of the ability. --------
      • -------- Also, to get the amount of agility, multiply RAmount by the level of the ability. --------
      • -------- It is simple: --------
      • -------- Time = RTime x Level of the Ability being cast --------
      • -------- Agility = RAmount x Level of the Ability being cast --------
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set AgileAbility = Agile
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set AgileRTime = 3
      • Set AgileRAmount = 50
      • Set AgileDamagePercent = 4.00
      • Set AgileDamageSize = 300
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set AgileSFX1 = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Set AgileSFX1_AP = origin
      • Set AgileSFX2 = Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl
      • Set AgileSFX2_AP = overhead
      • Set AgileSFX3 = Abilities\Weapons\GlaiveMissile\GlaiveMissileTarget.mdl
      • Set AgileSFX3_Ap = origin
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- Divide the given agility by the DamagePercent to get the damage dealt to the sorrounding melee units --------
      • -------- Damage size is the Area of Effect multiplied by the level of the level of Agile --------
      • -------- //////////////////////////////////////////////////////////////////////// --------
  • AgileAbilityCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to AgileAbility
    • Actions
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- Do not modify anything found below --------
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- counting how many are using the ability --------
      • Set Agileindex_size = (Agileindex_size + 1)
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- indexing --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Agileindex_size Greater than Agileindex_max_size
        • Then - Actions
          • Set Agileindex[Agileindex_size] = Agileindex_size
          • Set Agileindex_max_size = Agileindex_size
        • Else - Actions
      • Set AgileInteger = Agileindex[Agileindex_size]
      • -------- done indexing --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- setting for the arrays --------
      • Set AgileCasters[AgileInteger] = (Triggering unit)
      • Set AgileLevel = (Level of Agile for AgileCasters[AgileInteger])
      • Set AgileAmount[AgileInteger] = (AgileRAmount x AgileLevel)
      • Set AgileTime[AgileInteger] = (AgileRTime x AgileLevel)
      • Set AgileDamage = (AgileAmount[AgileInteger] / 4)
      • Set Agile_AoE = ((Real(AgileDamageSize)) x (Real((Level of Agile for AgileCasters[AgileInteger]))))
      • Set AgileDamageArea = (Position of AgileCasters[AgileInteger])
      • Set AgileDamageEnemy = (Units within Agile_AoE of AgileDamageArea matching ((((Matching unit) belongs to an enemy of (Owner of AgileCasters[AgileInteger])) Equal to True) and (((Matching unit) is A melee attacker) Equal to True)))
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- The ability is given here --------
      • Hero - Modify Agility of AgileCasters[AgileInteger]: Add AgileAmount[AgileInteger]
      • -------- additional 1/4 damage take from the given agility. --------
      • Unit Group - Pick every unit in AgileDamageEnemy and do (Actions)
        • Loop - Actions
          • Set AgileEnemies = (Picked unit)
          • Unit - Cause AgileCasters[AgileInteger] to damage AgileEnemies, dealing (Real(AgileDamage)) damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect attached to the AgileSFX3_Ap of AgileEnemies using AgileSFX3
          • Special Effect - Destroy (Last created special effect)
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Also giving some special effects --------
      • Special Effect - Create a special effect attached to the AgileSFX1_AP of AgileCasters[AgileInteger] using AgileSFX1
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the AgileSFX2_AP of AgileCasters[AgileInteger] using AgileSFX2
      • Set AgileCasterSE[AgileInteger] = (Last created special effect)
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Custom script: call RemoveLocation(udg_AgileDamageArea)
      • Custom script: call DestroyGroup(udg_AgileDamageEnemy)
      • -------- turning on the cast time --------
      • Trigger - Turn on AgileTime <gen>
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- //////////////////////////////////////////////////////////////////////// --------
  • AgileTime
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- Do not modify anything found below --------
      • -------- //////////////////////////////////////////////////////////////////////// --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • For each (Integer AgileLoop) from 1 to Agileindex_size, do (Actions)
        • Loop - Actions
          • Set AgileInteger = Agileindex[AgileLoop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AgileTime[AgileInteger] Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (AgileCasters[AgileInteger] is dead) Equal to True
                • Then - Actions
                  • Hero - Modify Agility of AgileCasters[AgileInteger]: Subtract AgileAmount[AgileInteger]
                  • Special Effect - Destroy AgileCasterSE[AgileInteger]
                  • Set Agileindex[AgileLoop] = Agileindex[Agileindex_size]
                  • Set Agileindex[Agileindex_size] = AgileInteger
                  • Set Agileindex_size = (Agileindex_size - 1)
                  • Set AgileLoop = (AgileLoop - 1)
                  • If (Agileindex_size Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
                • Else - Actions
                  • Set AgileTime[AgileInteger] = (AgileTime[AgileInteger] - 1)
            • Else - Actions
              • -------- giving back the original Agility to the caster --------
              • Hero - Modify Agility of AgileCasters[AgileInteger]: Subtract AgileAmount[AgileInteger]
              • -------- ------------------------------------------------------------------------------------------------------------ --------
              • -------- needs to destroy its Special Effects --------
              • Special Effect - Destroy AgileCasterSE[AgileInteger]
              • -------- ------------------------------------------------------------------------------------------------------------ --------
              • -------- recycling --------
              • Set Agileindex[AgileLoop] = Agileindex[Agileindex_size]
              • Set Agileindex[Agileindex_size] = AgileInteger
              • Set Agileindex_size = (Agileindex_size - 1)
              • Set AgileLoop = (AgileLoop - 1)
              • -------- ------------------------------------------------------------------------------------------------------------ --------
              • -------- trigger shut off --------
              • If (Agileindex_size Equal to 0) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
              • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- //////////////////////////////////////////////////////////////////////// --------
Keywords:
agility, fast, hero, eubz
Contents

Agile v1.2.1 (Map)

Reviews
23:09, 16th Jul 2013 Magtheridon96: Approved.
btw, on the config, does the damage also scale with level? if yes, I think you should say so in comments too... :)

also,

Divide the given agility by the DamagePercent to get the damage dealt to the sorrounding melee units

--> Isn't percentage normally used as a multiplier? If this uses divide, I just find the name quite misleading...

BTW, I think you forgot to use DamagePercent on your formula... from the looks of it, you used 4 directly in your formula instead of the variable...

Also, I don't see the point of the Agileindex_max_size variable... Personally, I find the use of the Agileindex array pretty useless...

  • Set Agileindex[Agileindex_size] = Agileindex_size
You set a variable in an array to be the same values as it's index, so why bother saving it into the array?

  • AgileInteger = Agileindex[Agileindex_size]
that is no different than this

  • AgileInteger = Agileindex_size
Also, you can also just use Agileindex_size directly on your casting trigger since the cast process is "instant" anyway... though you can maintain the AgileInteger for protection... but the array for the index is seriously just an overprocessing...
 
Top