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.

Disarm System Version 1.1.1

This bundle is marked as approved. It works and satisfies the submission rules.
FOR 1.29+ USERS : READ THIS

DISARM SYSTEM BY DAFFA THE MAGE
==================================================================
DESCRIPTION :
A system that allows user to disarm a unit with configurables.
==================================================================
MANUAL :
(1)Preference :
Make sure "Automatically creates Unknown Variables when pasting trigger data" is ticked on

(2)Object Editor :
Copy and Paste "Disarm Ability" to your map

(3)Trigger Editor :
Copy and Paste "Disarm System" folder to your map
Set the variables in the "Disarm Config" to the correct values
Configure the system using the instructions in the "Disarm Manual"

If it's still not enough, look at the Example folder on the test map for actual usage
==================================================================
TRIGGERS
MANUAL

  • Disarm Manual
    • Events
    • Conditions
    • Actions
      • -------- Below are the available variables that needs to be modified by user to use the system --------
      • -------- Check "Applying Examples" for more information --------
      • -------- The affected unit --------
      • Set DisarmedUnit = (Last created unit)
      • -------- The source --------
      • Set DisarmSource = (Last created unit)
      • -------- Duration of disarm to target --------
      • Set DisarmDuration = 0.00
      • -------- File path for SFX on affected unit, needs DisarmAttachment to be placed on unit's body properly --------
      • Set DisarmEffect = <Empty String>
      • -------- Location of SFX attachment --------
      • Set DisarmAttachment = <Empty String>
      • -------- If this set to true, the duration will stack else it will overrides (the highest one will take place) --------
      • -------- e.g1 : a unit has 3 non-stack second duration, then another unit gives a new registration --------
      • -------- the new registration is stack and has 2 second, this means the affected unit now take 3 + 2 = 5 seconds --------
      • -------- e.g2 : a unit has 3 stack second duration, then another unit gives a new registration --------
      • -------- the new registration is non-stack and has 2 second, this means the affected unit now take 3 seconds (as the newest one doesn't stack and has less duration) --------
      • Set DisarmDurationStack = False
      • -------- ======================================== --------
      • -------- WARNING --------
      • -------- Due to limitation with the current script for SFX (1 SFX per unit) and only the latest one will take effect --------
      • -------- ======================================== --------
      • -------- BASIC USAGE --------
      • -------- ======================================== --------
      • -------- Below are available states that players can get from a disarmed unit --------
      • Set DisarmState = 0.00
      • -------- A unit takes disarm = 1.00 (triggers when units are registered to the system) --------
      • -------- Disarm in progress = 1.50 (remember to calculate that this run 32 times in 1 second) --------
      • -------- Disarm ends = 2.00 (triggers on death or duration ends) --------
      • -------- To avoid taking wrong units, it's advised to use buffs on disarmed units that takes additional effects so they can be used as filters --------
      • -------- To attain correct unit on disarm end, it's recommended that it has a disarm buff that has a very slight longer duration than the disarm itself (0.04-0.10) --------
      • -------- There's another method involving detect the disarm --------
      • Set IsUnitDisarmed[(Custom value of DisarmedUnit)] = False
      • -------- The above variable will return true (the system does the checking automatically) and you can use this for detections --------
      • -------- Check in condition of a trigger for it's status, and the value will be used --------
      • -------- Check Applying Examples folder, the Paladin Spell trigger for more information --------
      • -------- ======================================== --------
      • -------- ADVANCED USAGE --------
      • -------- ======================================== --------
      • -------- Below is how to check for duration --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DisarmDurRemain[(Custom value of DisarmedUnit)] Less than 3.00
        • Then - Actions
          • -------- ACTIONS HERE --------
        • Else - Actions
      • -------- To modify duration, we do as seen below, the below example sets the duration to 10 seconds --------
      • Set DisarmDurRemain[(Custom value of DisarmedUnit)] = 10.00
      • -------- Duration can be frozen, which halt it from decreased by the loop, do as shown below to apply it --------
      • Set DisarmDurationIsFrozen[(Custom value of DisarmedUnit)] = True
      • -------- However, make sure to release the freeze else it will be permanent, a frozen duration can be released with below technique --------
      • Set DisarmDurationIsFrozen[(Custom value of DisarmedUnit)] = False
      • -------- A "frozen" duration disarm is AUTOMATICALLY released when the disarmed unit dies --------


  • Disarm Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ======================================== --------
      • -------- This is the base ability to erase 'Attack' ability --------
      • -------- Copy the one from sample map and paste it on your map then set this variable to that ability --------
      • Set DisarmAbility = Disarm Ability
      • -------- Use variable below with Run Trigger function to run the system --------
      • -------- Set this variable to Disarm System trigger --------
      • Set DisarmTrigger = Disarm System <gen>
      • -------- Set this to Disarm Loop trigger --------
      • Set DisarmLoopTrigger = Disarm Loop <gen>
      • -------- END OF DETAIL - BELOW ARE CORE PART --------
      • -------- This is the loop value, 32 execution per second --------
      • Custom script: set udg_DisarmLoop = 0.03125
      • Trigger - Add to DisarmLoopTrigger the event (Time - Every DisarmLoop seconds of game time)

  • Disarm System
    • Events
    • Conditions
    • Actions
      • -------- Start the system --------
      • Set DisarmUnitValue = (Custom value of DisarmedUnit)
      • Set DisarmDurationStackBoolean[DisarmUnitValue] = DisarmDurationStack
      • Set DisarmSourceUnit[DisarmUnitValue] = DisarmSource
      • -------- Duration input --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DisarmDurationStackBoolean[DisarmUnitValue] Equal to True
        • Then - Actions
          • Set DisarmDurRemain[DisarmUnitValue] = (DisarmDurRemain[DisarmUnitValue] + DisarmDuration)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DisarmDurRemain[DisarmUnitValue] Less than or equal to DisarmDuration
            • Then - Actions
              • Set DisarmDurRemain[DisarmUnitValue] = DisarmDuration
            • Else - Actions
      • -------- Check state of current units, is it already disarmed or not --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsUnitDisarmed[DisarmUnitValue] Equal to False
        • Then - Actions
          • -------- Apply effect if doesn't applied yet --------
          • Set IsUnitDisarmed[DisarmUnitValue] = True
          • Unit - Add DisarmAbility to DisarmedUnit
          • Special Effect - Create a special effect attached to the DisarmAttachment of DisarmedUnit using DisarmEffect
          • Set DisarmSFX[DisarmUnitValue] = (Last created special effect)
          • -------- Insert to system loop --------
          • Unit Group - Add DisarmedUnit to DisarmGroup
          • Set DisarmCounter = (DisarmCounter + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DisarmCounter Equal to 1
            • Then - Actions
              • Trigger - Turn on DisarmLoopTrigger
            • Else - Actions
        • Else - Actions
          • Special Effect - Destroy DisarmSFX[DisarmUnitValue]
          • Special Effect - Create a special effect attached to the DisarmAttachment of DisarmedUnit using DisarmEffect
          • Set DisarmSFX[DisarmUnitValue] = (Last created special effect)
      • -------- Return State --------
      • Set DisarmState = 1.00
      • Set DisarmState = 0.00

  • Disarm Loop
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DisarmGroup and do (Actions)
        • Loop - Actions
          • Set DisarmedUnit = (Picked unit)
          • Set DisarmUnitValue = (Custom value of DisarmedUnit)
          • -------- Return state --------
          • Set DisarmState = 1.50
          • Set DisarmState = 0.00
          • -------- Duration check --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DisarmDurationIsFrozen[DisarmUnitValue] Equal to False
            • Then - Actions
              • Set DisarmDurRemain[DisarmUnitValue] = (DisarmDurRemain[DisarmUnitValue] - DisarmLoop)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • DisarmDurRemain[DisarmUnitValue] Less than 0.00
                  • (DisarmedUnit is dead) Equal to True
            • Then - Actions
              • -------- Return state --------
              • Set DisarmState = 2.00
              • Set DisarmState = 0.00
              • -------- Unregister --------
              • Set IsUnitDisarmed[DisarmUnitValue] = False
              • Set DisarmDurationIsFrozen[DisarmUnitValue] = False
              • Set DisarmDurRemain[DisarmUnitValue] = 0.00
              • Set DisarmSourceUnit[DisarmUnitValue] = No unit
              • Special Effect - Destroy DisarmSFX[DisarmUnitValue]
              • Unit - Remove DisarmAbility from DisarmedUnit
              • Unit Group - Remove DisarmedUnit from DisarmGroup
              • Set DisarmCounter = (DisarmCounter - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DisarmCounter Equal to 0
                • Then - Actions
                  • Trigger - Turn off DisarmLoopTrigger
                • Else - Actions
            • Else - Actions


===================================================================
CREDITS
Bribe : Unit Indexer
unkn0wn_d3str0y3r : his Disarm System that inspired me
===================================================================
CHANGELOG :
Version 1.1.1
Fixed a major issue with DisarmDurationIsFrozen
Reduces the amount of Comment Lines

Version 1.1.0
Add More Features

Version 1.0.0
First Upload


Keywords:
Disarm, System, d, i, s, a, r, m, y, t, e, Daffa the Mage, Disarming, Disables, No Attack
Contents

Disarm System (Map)

Reviews
Moderator
12:11, 7th Apr 2015 IcemanBo: Useful.
  1. 12:11, 7th Apr 2015
    IcemanBo: Useful.
     
  2. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,234
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    It's very easy and faster to use timer and hashtable instead of periodical unit enumeration. It's getting heavier as the disarmed units are increasing.
     
  3. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Using Hashtables and Timer Enum, I might consider it though.
    But I doubt it's too heavy as I see multiple units can be added just fine.
     
  4. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Disarm... what does it do?
    WC3 does not have "weapons" so units cannot be disarmed.
    (I know that it is just "blind" but yea you did not mention it.)

    Also why does this one has to be used over the existing ones?
    People who already use those must know why they should use this one instead.
    People who do not use any yet and want to use one will use the same as everyone else does... 70% of the time.
     
  5. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    This one offers complete control over the disarmed units, you have practically all the access you need.
    Basically, in short this one grants full control for users, want to disarm unit while giving them DPS? Sure, disarm then slow them at the end? Why not, disarm and deal double damage to them while disarmed? Okay.
    In short, it offers control over the target, which sometime might be a case for user who wants to make a complex spell relying in disarmed units (or in short, blind).
     
  6. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,109
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Looks good and simple to use.
    If unit is already registred no need to increase the counter and no need to add the unit to group.
    Getting unit's current stun duration could be useful, too. Just an idea.
    User could take it in consideration to define the new disarm duration onRegister.

    DisarmAttachment
    DisatmEffect

    ^These should be constants, and be set once in config part. You won't anyway create an other effect if unit is registered already, so it will never have different effects.

    So register will only look like:
    Set DisarmUnit = <MyUnit>
    Set Duration = <MyDuration>

    What could be maybe useful is to change the static boolean to stack/not stack to dynamic one.
    Though that's also only an idea.
     
  7. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    And this is done by adding an ability to a unit and removing it when the disarm would be removed?

    (I do see the complex stuff about remaining duration and stuff but just that we are on the same level.)
     
  8. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Thanks :)

    I will fix that one.

    I consider getting the duration, but that would requires a little nifty code to make it easy to implement.

    The effect is optioned so that each units can have different effects and such.
    The duration Boolean?

    Yeah, it's using the basic technique, which is also applied to my old Blind Spell (in my resources list).
    It's not complex for the basic technique, but this one offers a lot for users that wants a completely controllable disarming.
     
  9. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    :D I can write your system with only 1 configuration trigger inside my EOT System :p
    Not to just kick your (_._)... that system of mine is also not yet approved :\
     
  10. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,109
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    But if you want to register unit once again (now with different effect), it won't be shown. :/
     
  11. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    It's your call, all I want to give is a simple system with some features. Users have their calls, and it's their preference to choose which they want.
    The system isn't too complex so it's not difficult for user to learn it's features, and not a pain for me to create.

    Yeah, tried some different tricks yet none worked, I wonder if overriding the old one is better than discarding the new one, your opinion?
    Hope I figure something by a few days or anything,
     
  12. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Haha, I got problems with that one :D
     
  13. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Okay, planned updates :
    1. Fix the annoying SFX issue, so users can attach SFX directly to system without buffs, the retrieving method still requires a filter to check which spell or attack affect the disarmed unit.
    2. Allows duration manipulation, this is to allow user adding, subtract, multiplies, divides and so on the remaining duration of disarmed units, meaning user has full control over disarmed unit's duration.
    3. Point 2 will also come along with another Boolean that allows or prohibits a certain unit from having their duration manipulated. A mechanic will also be explained for this one.
    4. Duration stacking Boolean changed into dynamic one. The mechanic will be explained later.
    5. Improves the registration trigger, giving it more optimization
    6. if possible, animations can be included, mainly during the start and ending phase. {Optional}

    Well, hope they can be applied to the system :)
     
  14. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,109
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    In this case removing the old and using the new indeed might be better, but frankly I don't think you have to bother with multiple effects.
    People probably don't need many different effects to indicate a "disarmed" unit. You doubtless could go with one constant one I believe! :csmile:

    User already can catch the start and end event, so he can use this for animation if really needed.

    With doing as less extra features as possible you're doing fine I believe.. it will be useful. Gl with next update!
     
  15. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Perhaps you're correct about that one, but users might want different effects for some units and some others (example : unit A effect A, unit B effect B and so on) or anything else in their minds. :csmile:

    To be honest, you're correct, I should have think about it before :)

    Thanks, hope I can carry out the update :)
     
  16. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Here's a list of status while preparing the new version :
    1. Successfully implement point 4, but... Refer to 2
    2. About stacking, how should the stack rules applies? Should stacking and non-stacking duration holds 2 different durations?
    3. I figure out that modification of the duration (Point 2 & 3 from the planned update) is quite difficult to control and seems advanced. I might not implement Boolean rules into it, so maybe only point 2 will applies in next update
    4. SFX issue still persist, but this time e newest one will be shown instead of the older one.
    5. Scrapped Point 6, IcemanBo explains it well in this post.
     
  17. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Alright, here's a surprise news.

    Current status :
    1. Well, point 3 is scrapped (for now) and I manage to find a solution to point 2, it's by making the default duration remaining variable modifiable by user
    2. Making a new manual for an in-depth guide through the system usage, what I said in point 1 is included in this new manual, as advanced usage.

    Below are planned stuffs before the update :
    1. Make the disarm source accessible, this is important for damage through disarm and such that involves caster <-> target
    2. Make the duration possible to be "frozen", causing it to stop decreasing until "unfrozen"
     
  18. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,574
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Plz.. stop putting 3 comment lines and one GUI line.. it seriously annoys me.
     
  19. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,572
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    Alright, I'll take that into my note and fix it, might switch to a comment trigger or Jass for the Disarm Manual trigger though.

    EDIT :
    Found a major bug with the disarm freezing duration mechanic, don't use it until the next update!