Spinning Blade 4.0v

  • Like
Reactions: BUP and Ethereal_
This is my first spell uploaded - Spinning blade. I it's MUI and leakless (i think). But still - if there is a problem with my triggers, or if there are leaks - tell me. I hope you like my spell! :)

Spell description : Throws a spinning blade in any direction, traveling 600/900/1200 units. The blade deals 50/100/150 damage to every enemy it cuts.

Spinning Blade 1.0v - the spell's creation.
Spinning Blade 2.0v - some leaks cleared, indexing system changed, test map changed, some spell documentation added.
Spinning Blade 3.0v - some leaks got pwned.
Spinning Blade 4.0v - SBBladePos removed from the Cast Trigger because it does nothing. 'Skip remaining actions' removed from the Loop Trigger because it does nothing. Condition '((Picked Unit) is alive) Equal to True' added to the damaging part of the Loop Trigger



  • SB Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spinning Blade
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ID2 Equal to 0
        • Then - Actions
          • Trigger - Turn on SB Loop <gen>
        • Else - Actions
      • Set ID2 = (ID2 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ID2 Greater than IDMax
        • Then - Actions
          • Set ID[ID2] = ID2
          • Set IDMax = ID2
        • Else - Actions
      • Set SBArray = ID[ID2]
      • Set SBCaster[SBArray] = (Triggering unit)
      • Set SBCasterPos[SBArray] = (Position of SBCaster[SBArray])
      • Set SBLevel[SBArray] = (Level of Spinning Blade for SBCaster[SBArray])
      • Set SBPoint[SBArray] = (Target point of ability being cast)
      • Set SBAngle[SBArray] = (Angle from SBCasterPos[SBArray] to SBPoint[SBArray])
      • Set SBDistance[SBArray] = 0
      • Set SBTransparency[SBArray] = 0
      • -------- --------------------- VALUES THAT CAN BE CHANGED --------------------- --------
      • -------- SBMaxDistance = the max distance the blade can travel. In this case - 300 + 300 x Level of Spinning Blade. --------
      • Set SBMaxDistance[SBArray] = (300 + (SBLevel[SBArray] x 300))
      • -------- SBBladeSpeed = the speed of the blade. Bigger value = greater speed. --------
      • Set SBBladeSpeed = 25.00
      • -------- SBRadius = the radius from the center of the blade till the end of it in which enemies take damage. --------
      • Set SBRadius = 90.00
      • -------- SBDamage - the damage each cutted enemy takes. 'Spell_Level x 50' in this case. --------
      • Set SBDamage = ((Real(SBLevel[SBArray])) x 50.00)
      • -------- SBTransparencyRate = the rate at which the blades fade. Greater value = faster fading. (i recommend values below 25) --------
      • -------- Take note that the distance traveled while the blades are fading is additional to the SBMaxDistance value! => More fading time = bigger distance --------
      • Set SBTransparencyRate = 10
      • -------- --------------------- VALUES THAT CAN BE CHANGED --------------------- --------
      • Unit - Create 1 Spinning Blade for (Owner of SBCaster[SBArray]) at SBCasterPos[SBArray] facing Default building facing degrees
      • Set SBBlade[SBArray] = (Last created unit)
      • Custom script: set udg_SBUnitGroupDamaged[udg_SBArray] = CreateGroup()
      • Animation - Change SBBlade[SBArray] flying height to 40.00 at 0.00
      • Custom script: call RemoveLocation(udg_SBCasterPos[udg_SBArray])
      • Custom script: call RemoveLocation(udg_SBPoint[udg_SBArray])
  • SB Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SBLoop) from 1 to ID2, do (Actions)
        • Loop - Actions
          • Set SBArray = ID[SBLoop]
          • Set SBBladePos[SBArray] = (Position of SBBlade[SBArray])
          • Set SBBladePos_second = (SBBladePos[SBArray] offset by SBBladeSpeed towards SBAngle[SBArray] degrees)
          • Set SBDistance[SBArray] = (SBDistance[SBArray] + (Integer(SBBladeSpeed)))
          • Set SBUnitGroup[SBArray] = (Units within SBRadius of SBBladePos[SBArray])
          • Unit - Move SBBlade[SBArray] instantly to SBBladePos_second
          • Custom script: call RemoveLocation(udg_SBBladePos_second)
          • Custom script: call RemoveLocation(udg_SBBladePos[udg_SBArray])
          • Unit Group - Pick every unit in SBUnitGroup[SBArray] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) is in SBUnitGroupDamaged[SBArray]) Equal to False
                  • ((Picked unit) belongs to an enemy of (Owner of SBBlade[SBArray])) Equal to True
                • Then - Actions
                  • Unit - Cause SBBlade[SBArray] to damage (Picked unit), dealing SBDamage damage of attack type Spells and damage type Normal
                  • -------- The effect (below) appears on every cutted enemy. --------
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit Group - Add (Picked unit) to SBUnitGroupDamaged[SBArray]
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SBDistance[SBArray] Greater than or equal to SBMaxDistance[SBArray]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SBTransparency[SBArray] Greater than or equal to 100
                • Then - Actions
                  • Unit - Remove SBBlade[SBArray] from the game
                  • Custom script: call DestroyGroup(udg_SBUnitGroupDamaged[udg_SBArray])
                  • Set ID[SBLoop] = ID[ID2]
                  • Set ID[ID2] = SBArray
                  • Set ID2 = (ID2 - 1)
                  • Set SBLoop = (SBLoop - 1)
                • Else - Actions
                  • Animation - Change SBBlade[SBArray]'s vertex coloring to (100.00%, 100.00%, 100.00%) with (Real(SBTransparency[SBArray]))% transparency
                  • Set SBTransparency[SBArray] = (SBTransparency[SBArray] + SBTransparencyRate)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ID2 Equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions


Special thanks to:
- Hanky -> for his dynamic indexing system

- Maker -> for assisting me in the damaging part of the spell

Keywords:
Spinning, Blade, spell, unit, target, damage, assassin, asasin, rogue, assasin, stealth, predator, ninja.
Contents

Spinning Blade 4.0v by ColdBone (Map)

Reviews
5 Feb 2012 Bribe: "SBBladePos" in the "cast" trigger doesn't even seem to be doing anything there ;) The "Skip remaining actions" is not required in the "loop" trigger ;) Otherwise it looks alright, Approved 3/5. Leaks the offset...

Moderator

M

Moderator

5 Feb 2012
Bribe: "SBBladePos" in the "cast" trigger doesn't even seem to be doing anything there ;)

The "Skip remaining actions" is not required in the "loop" trigger ;)

Otherwise it looks alright, Approved 3/5.


Reviewed by Maker, Spinning Blade, 2nd Feb 2012

  • Leaks the offset point
    • Unit - Create 1 Spinning Blade for (Owner of SBCaster[ID]) at (SBCasterPos[ID] offset by 70.00...
  • Not a good idea to add events, once the unit dies the event is useless
    • Trigger - Add to Damage <gen> the event (Unit - A unit comes within 50.00 of SBBlade[ID])
  • Move trigger should be initially off and turned off when it is not needed
  • The indexing is not good
  • Add version number
  • Add importing instructions into the map file
  • You can't tell the value of ID here
    • ((Triggering unit) belongs to an enemy of (Owner of SBCaster[ID])) Equal to True
    • Unit - Cause SBBlade[ID] to damage (Triggering unit), dealing ((Real(SBLevel[ID])) x 50.00) damage of attack type Spells and damage type Normal
 
WTF is test map ?
Change it please, it can create lags on some comps.

Also, 0.03 seconds is more efficient than 0.02 in the loop trigger.

You Indexing suxx, you're doing many useless loops after some time, and this can slow the game. Try to avoid it.

You never turn on/off your looping trigger and it slows the game.

You're spell isn't MUI cauz' of the Damage Trigger.

You're leaking locations.
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
@Vladadamm - I know my Indexing sux, but i was looking for a indexing system without a Unit Indexer trigger (because i can't learn how to use it :D). When i can turn the loop trigger off? What is wrong with my Damage Trigger? I mean that every unit gets damaged and i don't get whats wrong with it's MUIness. And finally - tell me where my triggers leak, please! :)

Thanks for responding! :)

---- UPDATED ----
 
Last edited:
Top