1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. The 15th Mini-Mapping Contest came to an end. The Secrets of Warcraft 3 are soon to be revealed! Come and vote in the public poll for your favorite maps.
    Dismiss Notice
  4. The 12th incarnation of the Music Contest is LIVE! The theme is Synthwave. Knight Rider needs a song to listen to on his journey. You should definitely have some fun with this theme!
    Dismiss Notice
  5. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Torrent Slash v1.02

Submitted by Mythic
This bundle is marked as approved. It works and satisfies the submission rules.
Hello! I decided to update my spell, after a long time of waiting.
===================================
Calls forth several blades to converge towards the caster after a few seconds.

TRIGGERS


  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- The ability --------
      • Set Cnfg_TS_Ability = Torrent Slash
      • -------- ---------------------------------- --------
      • -------- Angle Reduction of the four blades. --------
      • Set Cnfg_TS_AngleRed = 6.20
      • -------- The number of blades created --------
      • Set Cnfg_TS_Blades = 6
      • -------- Damage of the Blades --------
      • Set Cnfg_TS_BladeDamage[1] = 25.00
      • Set Cnfg_TS_BladeDamage[2] = 32.00
      • Set Cnfg_TS_BladeDamage[3] = 40.00
      • -------- How far the blades can damage units --------
      • Set Cnfg_TS_BladeDamageRange = 66.66
      • Set Cnfg_TS_BladeModel = Abilities\Weapons\BloodElfSpellThiefMISSILE\BloodElfSpellThiefMISSILE.mdl
      • -------- The model of the blood --------
      • Set Cnfg_TS_BladeHitEffect = BloodSplatTiny.mdx
      • -------- The size of the blade in percentage --------
      • Set Cnfg_TS_BladeSize = 150.00
      • -------- Speed --------
      • Set Cnfg_TS_BladeSpeed = 60.00
      • -------- The degrees between each blade creation. If you want a circle, divide 360 by the number of blades. --------
      • Set Cnfg_TS_DegreesPerArray = 60.00
      • -------- Circumference of the blade spawn --------
      • Set Cnfg_TS_DistancePerBlades = 500.00
      • Set Cnfg_TS_DistancePerBlades = (Cnfg_TS_DistancePerBlades / 2.00)
      • -------- How long each blade lasts --------
      • Set Cnfg_TS_DurationMax = 2.22
      • -------- Every other blade receives a decrease in speed, but increase in lifetime. Decimal % --------
      • -------- Warning: Never set to 0.00. --------
      • Set Cnfg_TS_LayerDiff = 1.50


  • Torrent Slash
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cnfg_TS_Ability
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TS_MaxIndex Equal to 0
        • Then - Actions
          • Trigger - Turn on Torrent Slash Loop <gen>
        • Else - Actions
      • Set OffsetLoc = (Position of (Triggering unit))
      • Set TempInteger = 1
      • -------- Blades --------
      • For each (Integer TempIndex) from 1 to Cnfg_TS_Blades, do (Actions)
        • Loop - Actions
          • -------- Indexing --------
          • Set TS_MaxIndex = (TS_MaxIndex + 1)
          • -------- Cache caster --------
          • Set TS_Caster[TS_MaxIndex] = (Triggering unit)
          • Set TS_Damage[TS_MaxIndex] = Cnfg_TS_BladeDamage[(Level of Cnfg_TS_Ability for TS_Caster[TS_MaxIndex])]
          • -------- Angle/Duration/Speed --------
          • Set TS_Duration[TS_MaxIndex] = Cnfg_TS_DurationMax
          • Set TS_Speed[TS_MaxIndex] = Cnfg_TS_BladeSpeed
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TempInteger Equal to 1
            • Then - Actions
              • Set TempInteger = 0
            • Else - Actions
              • Set TempInteger = 1
              • -------- Wild One! --------
              • Set TS_Duration[TS_MaxIndex] = (TS_Duration[TS_MaxIndex] x Cnfg_TS_LayerDiff)
              • Set TS_Speed[TS_MaxIndex] = (TS_Speed[TS_MaxIndex] - (TS_Speed[TS_MaxIndex] / Cnfg_TS_LayerDiff))
          • -------- Player --------
          • Set TS_Player[TS_MaxIndex] = (Owner of TS_Caster[TS_MaxIndex])
          • Set TempReal = (Cnfg_TS_DegreesPerArray x (Real(TempIndex)))
          • Set TS_BladeDegree[TS_MaxIndex] = TempReal
          • Set TempPoint = (OffsetLoc offset by Cnfg_TS_DistancePerBlades towards TempReal degrees)
          • Unit - Create 1 Dummy for TS_Player[TS_MaxIndex] at TempPoint facing TS_BladeDegree[TS_MaxIndex] degrees
          • Custom script: set udg_TS_Blade[udg_TS_MaxIndex] = bj_lastCreatedUnit
          • Unit - Add a TS_Duration[TS_MaxIndex] second Generic expiration timer to TS_Blade[TS_MaxIndex]
          • Animation - Change TS_Blade[TS_MaxIndex]'s size to (Cnfg_TS_BladeSize%, 0.00%, 0.00%) of its original size
          • Special Effect - Create a special effect attached to the chest of TS_Blade[TS_MaxIndex] using Cnfg_TS_BladeModel
          • Set TS_BladeEffect[TS_MaxIndex] = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_OffsetLoc)


  • Torrent Slash Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer TempIndex) from 1 to TS_MaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TS_Duration[TempIndex] Greater than 0.00
            • Then - Actions
              • Set TS_Duration[TempIndex] = (TS_Duration[TempIndex] - 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (TS_Blade[TempIndex] is alive) Equal to True
                • Then - Actions
                  • -------- ------------ --------
                  • Set TempPoint = (Position of TS_Blade[TempIndex])
                  • Set TS_BladeDegree[TempIndex] = (TS_BladeDegree[TempIndex] - Cnfg_TS_AngleRed)
                  • Set OffsetLoc = (TempPoint offset by TS_Speed[TempIndex] towards TS_BladeDegree[TempIndex] degrees)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • Unit - Move TS_Blade[TempIndex] instantly to OffsetLoc, facing TS_BladeDegree[TempIndex] degrees
                  • -------- Damage Group --------
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within Cnfg_TS_BladeDamageRange of OffsetLoc) and do (Actions)
                    • Loop - Actions
                      • Set TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Life of TempUnit) Greater than 0.41
                          • (TempUnit belongs to an enemy of TS_Player[TempIndex]) Equal to True
                        • Then - Actions
                          • Unit - Cause TS_Caster[TempIndex] to damage TempUnit, dealing TS_Damage[TempIndex] damage of attack type Spells and damage type Universal
                          • Special Effect - Create a special effect attached to the chest of TempUnit using Cnfg_TS_BladeHitEffect
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_OffsetLoc)
                • Else - Actions
            • Else - Actions
              • -------- Leak Removal --------
              • Custom script: call DestroyEffect(udg_TS_BladeEffect[udg_TempIndex])
              • -------- Here, we replace the CurrentIndex with the Max. --------
              • Set TS_Blade[TempIndex] = TS_Blade[TS_MaxIndex]
              • Set TS_BladeDegree[TempIndex] = TS_BladeDegree[TS_MaxIndex]
              • Set TS_BladeEffect[TempIndex] = TS_BladeEffect[TS_MaxIndex]
              • Set TS_Caster[TempIndex] = TS_Caster[TS_MaxIndex]
              • Set TS_Damage[TempIndex] = TS_Damage[TS_MaxIndex]
              • Set TS_Duration[TempIndex] = TS_Duration[TS_MaxIndex]
              • Set TS_Speed[TempIndex] = TS_Speed[TS_MaxIndex]
              • Set TS_MaxIndex = (TS_MaxIndex - 1)
              • Set TempIndex = (TempIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TS_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
              • Custom script: set udg_TempUnit = null


CHANGELOG
v1.00 - Uploaded
x/x/13 v1.01 - Fixed some little things.
8/1/14 v.1.02 - Overhaul.


CREDITS
Icon: lelyanra, recolored by me.


Keywords:
Torrent, Slash, Torrent Slash, Cake
Contents

Torrent Slash (Map)

Reviews
Moderator
BPower: Approved. Old: Torrent Slash v1.01 | Reviewed by Maker | 30th Jun 2013 NEEDS FIX [IMG] You are leaking special effects in the looping trigger [tr] [IMG] You could index the blade unit / degree / effect...
  1. BPower: Approved.

    Old:
    Torrent Slash v1.01 | Reviewed by Maker | 30th Jun 2013
    NEEDS FIX

    [​IMG]
    • You are leaking special effects in the looping trigger
    [​IMG]
    • You could index the blade unit / degree / effect into single
      arrays to avoid long if/then/elses in the cast and looping trigger

     
  2. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    ~Reserved. Feel free to give constructive criticism and tips. :cgrin:

    Remember to use Ctrl + F5, since I updated it.
     
    Last edited: Aug 1, 2014
  3. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    I see you use arrays when you don't need to. I just makes things more difficult to read and has no real benefit
     
  4. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    They're for levels of the spell..
     
  5. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    I mean those TempLevel, TempPoint, TempReal... variables.
     
  6. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    Ok, I'll try to remove their arrays once I get back to the computer.
     
  7. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,861
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    In the configuration trigger,there is a for loop action. In configurations,we don't use this,we put the values one by one in-case the user wants to have damage not relative to each other(e.g level 1 = 100, level 2 = 54.5, level 3 = 184.5,etc)

    and also, as I have mentioned to your spells and the other rejected spells that are in GUI must have their variables have a prefix,some of your variables are missing it.
     
  8. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    Wha-- Missing prefix..?
     
  9. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,861
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    TempPoint ,Temp Unit, etc.
    Btw, for loop must start at 1.

    and also, because of its current state about the glaives,the glaive number is not recommended as configurable anymore. It will be hard for those beginners to CnP the codes just to index the glaives 5>.

    Btw, Unit group range should be configurable.

    Replace UnitApplyTimedLifeBJ with call UnitApplyTimedLife(whichUnit, buffId, duration)
    and also, doing it in custom script is useless because GUI 99% BJS.

    Code (vJASS):
    //===========================================================================

    function UnitApplyTimedLifeBJ takes real duration, integer buffId, unit whichUnit returns nothing

        call UnitApplyTimedLife(whichUnit, buffId, duration)

    endfunction


    For the unit scaling(actions), set the other two values to 0. X is enough for scaling.
    So its (size, 0, 0)

    Ability Level of Caster must be indexed.

    Your indexing has a problem. You are not moving the last index to the removed index,you are just nulling the values of the removed index.
    It must be, ex.:
    set unitData[tempIndex] = unitData[lastIndex]

    Damage effect attachments should be configurable.

    TempPoint[0] = (TS_CasterPos[TempInteger[0]] offset by 400.00 towards 270.00 degrees)

    400 and 270 must be configurable as well.
     
  10. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Temp variables are better off without prefixes. That way there is a chance that the map already has variables with the same name and no new ones are created. It would be great if everyone used the same temp variables across all spells.
     
  11. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,861
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    The scary thing is that he uses arrays for them
     
  12. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    Oh and that last thing you mentioned, the height of the dummy is uncontrollable with that model, so I create it 400 range south of the hero to make it look normal. Also, I use tempvars many times..
     
  13. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    i dont like the arrayed lvls for this. i rather it this way although it kills what almia suggested. about lvl 2 being lower than lvl 1 for damage.

    i have 2 variables for damage one is called damageBase. the other is called damagePerLvl. the formula then goes like this. damageBase + ( abilityLvl * damagePerLvl)
    lets say my base is 500 and my per lvl one is 250.
    this means lvl 1 is 750. lvl 2 is 1000. lvl 3 is 1250 and so on.
    The best thing about this is those 2 variables work for all the lvls. As many lvl as u want. so if i want to change my ability to have 100 lvls then i dont have to have 100 lines of the damage. Those 2 variables already do it. example: lvl 100 would be like this 500 + ( 100 * 250)
    which would come out to be 25500 damage.

    ur indexing is also old style. i thought u learned the way i did it ?
     
  14. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    Okay I missed some lines in your trigger. I'll fix it soon.
     
  15. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    @deathismyfriend
    Level 1 - 300 Damage
    Level 2 - 330 Damage
    Level 3 - 420 Damage
    Level 4 - 760 Damage

    Solve this.

    @OT
    It is better to do it like this;
    • Actions
      • Set Damage[1] = 300.00
      • Set Damage[2] = 330.00
      • Set Damage[3] = 420.00
      • Set Damage[4] = 760.00

    It gives more freedom to the user and bend the spells' configuration to his/her will.

    In the cast trigger, you just need to do this;
    • Set DamageDealt = Damage[(Level of (Ability being cast) for (Triggering unit))]


    Or if you have multiple setup;
    • Actions
      • Set TempInt = (Level of (Ability being cast) for (Triggering unit))
      • Set DamageDealt = Damage[TempInt]
      • Set AreaOfEffect = AOE[TempInt]
      • Set Range = Distance[TempInt]


    But yes, everything in this world has pros and cons, right ?

    Formula-based
    Pros
    - Works with any kinds of level
    - No need extra work - just to need to find the right formula

    Cons
    - Value is in scale


    Indexing-based
    Pros
    - You can alter its value per level without being attached to a certain scale
    - Easy to understand and get what level does what damage

    Cons
    - If you have 100 levels = 100 lines of code


    So you just have to find which situation fits you the best.

    If your spell only has 5 levels or at least 10, just use Indexing-based.

    If your spell has 20 level or more, just Formula-based.
     
  16. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    Update, update, update. Hello world.
     
  17. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    In order to save computation time you should store TriggeringUnit into a variable. Variables lookups are much faster than function calls, consider the loop.

    • (Life of TempUnit) Greater than 0.41
    --> Change this IsUnitAlive, in a narrow sense units with 0.41 life are not dead. The excact border would be 0.405

    Damagetype and Attacktype could be configurable.
     
  18. Mythic

    Mythic

    Joined:
    Apr 24, 2012
    Messages:
    7,647
    Resources:
    101
    Models:
    86
    Icons:
    4
    Maps:
    3
    Spells:
    6
    Tutorials:
    2
    Resources:
    101
    You're right, I guess they are both BJs so no need to stay away from IsUnitAlive.

    Will do.
     
  19. Zed

    Zed

    Joined:
    Feb 22, 2014
    Messages:
    243
    Resources:
    0
    Resources:
    0
    What BJ?
    (iseewhatyoudidthere)