1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  3. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  4. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

Mind Control Field v1.0

Submitted by Daffa the Mage
This bundle is marked as approved. It works and satisfies the submission rules.
Mind Control Field
"Thou's heart is thee to possess."

ABILITY INFORMATION:
Controls all units in 600 area below or equal to certain level cap. Cannot control hero or structures. Lasts 15 seconds.
Level 1 - level 3 cap.
Level 2 - level 4 cap.
Level 3- level 5 cap.

INSTALLATION GUIDE:
1. Install Unit Indexer on your map
2. Copy the Mind Control Field ability in Object Editor
3. Paste the ability to your map's Object Editor
4. Copy the MindControlField folder in Trigger Editor
5. Paste the folder in your map's Trigger Editor
6. DONE! If you want to configure things, just modify MCF Config trigger

MEDIA SHOWCASE:
Contents

Mind Control Field (Map)

  1. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,243
    Resources:
    5
    Models:
    1
    Icons:
    1
    Spells:
    2
    JASS:
    1
    Resources:
    5
    @Daffa the Mage

    Hmmm, I'm curious on what will happen if two mind controlling agents (owned by different players) were to cast the same spell on (at least) the same target (group).
     
  2. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    Only if it's exact same time then there might be possibility for overlaps, but only the first source will control the units.
     
  3. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,243
    Resources:
    5
    Models:
    1
    Icons:
    1
    Spells:
    2
    JASS:
    1
    Resources:
    5
    I see. So, Mind Control Field has an effect that occurs once, up until the reversal of the effect, returning the targets back to their original owner. Is that correct?

    (This time, just asking as a regular user)
     
  4. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    Yes sir, it is like that.
     
  5. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    729
    Resources:
    2
    Spells:
    2
    Resources:
    2
    A suggestion:
    The dnd spell "sleep" covers an area similarly, why not add a set amount of health before failing?

    i.e. mind control value of 1000/2000/3000, each unit starting from the weakest subtracts from this value, if the value fails to match the next units health then the unit will resist the effect.
     
  6. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    dnd spell?

    Seems to be an interesting idea, I'll add that soon.
     
  7. Ofel

    Ofel

    Joined:
    Mar 29, 2012
    Messages:
    430
    Resources:
    10
    Spells:
    10
    Resources:
    10
    I can't preview the triggers.

    Adding buff effects could be great.
     
  8. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    Not sure what happened, it usually works. @Ralle might want to look what's up with it, given I don't use UMSWE GUI or anything similar.
     
  9. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    About the limit based on health, the problem lies with the fact unit group randomize the unit list, so I need to sort them by level and I'm not keen on that. Anyway, if it's okay, I can add the limiter without the sort level thingy. @Devalut
     
  10. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    729
    Resources:
    2
    Spells:
    2
    Resources:
    2
    I wanted to make the dnd sleep variant so I made it with gui lemme find the trigger...

    I made it using Tasyen's Delayed Action, oh and Bribe's Unit Indexer

    Cast
    • Sleep Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Sleep
      • Actions
        • Set MS_Key = (Custom value of (Triggering unit))
        • Set MS_Value[MS_Key] = ((100.00 + (300.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) + ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 10.00))
        • Set TempPoint = (Target point of ability being cast)
        • Set MS_Group[MS_Key] = (Units within 250.00 of TempPoint)
        • Custom script: set bj_wantDestroyGroup=true
        • Unit Group - Pick every unit in MS_Group_Temp[MS_Key] and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is A structure) Equal to False
                • ((Picked unit) is Magic Immune) Equal to False
                • ((Picked unit) is dead) Equal to False
                • ((Picked unit) is an illusion) Equal to False
                • ((Picked unit) is Summoned) Equal to False
                • ((Picked unit) has buff Sleep) Equal to False
              • Then - Actions
                • Unit Group - Add (Picked unit) to MS_Group[MS_Key]
              • Else - Actions
                • Unit Group - Remove (Picked unit) from TempGroup
        • Custom script: call RemoveLocation(udg_TempPoint)
        • Set DelayA___P_Reload_Dur = 0.01
        • Set DelayA___P_Reloads = (Number of units in MS_Group[MS_Key])
        • Set DelayA___P_Source = (Triggering unit)
        • Set DelayA___P_Loc = (Target point of ability being cast)
        • Set DelayA___P_Trigger = Sleep Tick <gen>
        • Trigger - Run DelayA_CONS_CREATE (ignoring conditions)
    Tick
    • Sleep Tick
      • Events
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • DelayA__Action_Has_Reloads Equal to True
          • Then - Actions
            • Set MS_Key = (Custom value of DelayA__Action_Source)
            • Set MS_Unit[MS_Key] = (Random unit from MS_Group[AAAA_Key])
            • Unit Group - Pick every unit in MS_Group[MS_Key] 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
                  • Then - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (Life of (Picked unit)) Less than (Life of MS_Unit[MS_Key])
                      • Then - Actions
                        • Set MS_Unit[MS_Key] = (Picked unit)
                      • Else - Actions
                  • Else - Actions
                    • Unit Group - Remove (Picked unit) from MS_Group[MS_Key]
            • Unit Group - Remove MS_Unit[MS_Key] from MS_Group[MS_Key]
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • MS_Value[MS_Key] Less than (Life of MS_Unit[MS_Key])
              • Then - Actions
                • Special Effect - Create a special effect at DelayA__Action_Loc using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
                • Special Effect - Destroy (Last created special effect)
                • Unit Group - Remove all units from MS_Group[MS_Key]
                • Set DelayA__Action_Terminate_This = True
              • Else - Actions
                • Special Effect - Create a special effect attached to the origin of MS_Unit[MS_Key] using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
                • Special Effect - Destroy (Last created special effect)
                • Set MS_Value[MS_Key] = (MS_Value[MS_Key] - (Life of MS_Unit[MS_Key]))
                • Unit - Create 1 Universal Dummy Unit for (Owner of DelayA__Action_Source) at DelayA__Action_Loc facing Default building facing degrees
                • Unit - Add Sleep Dummy (Neutral Hostile) to (Last created unit)
                • Unit - Order (Last created unit) to Undead Dreadlord - Sleep MS_Unit[MS_Key]
                • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
                • Set MS_Unit[MS_Key] = No unit
          • Else - Actions
            • Unit Group - Remove all units from MS_Group[AAAA_Key]
            • Set DelayA__Action_Terminate_This = True

    ETA: lol my lazy ass didn't realize you can make this with one trigger, sorry I made it a long time before I mentioned it here~
     
    Last edited: Mar 22, 2019
  11. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    I'm aware of how to make this spell fits the dnd of your needs, but it won't support sorting (as you put it 'from the weakest').
     
  12. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,243
    Resources:
    5
    Models:
    1
    Icons:
    1
    Spells:
    2
    JASS:
    1
    Resources:
    5
    Reply

    If one really must have to sort out the units, then I can suggest that another trigger will be made, acting out as some sort of event listener for the cast trigger. Upon passing all of the default filters, a flag variable will be set and the event listener will be executed, allowing one to further control the filtering mechanism of the spell. By default, the trigger above will do nothing. It is to be a customizable trigger for the user, with a note telling the user to change the value of the flag if the unit is undesirable.

    To visualize:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (MCF_Target is A structure) Equal to False
        • (MCF_Target is A Hero) Equal to False
        • (MCF_Target is alive) Equal to True
        • (MCF_Target is Magic Immune) Equal to False
        • (MCF_Target is Resistant) Equal to False
        • (MCF_Target is invulnerable) Equal to True
        • (MCF_Target belongs to an enemy of MCF_CastOwner) Equal to True
        • (MCF_Target is in MCF_GroupControlled) Equal to False
        • (Level of MCF_Target) Less than or equal to MCF_LevelCap[MCF_Level]
      • Then - Actions
        • Set MCF_IsTargetValid = true
        • Comment: ---------------------------------
        • Trigger - Run (MCF_FilterTrig)
        • If (All Conditions are True) then do (Then Actions) else do (Else actions)
          • If - Conditions
            • MCF_IsTargetValid Equal to True
          • Then - Actions
            • Set MCF_UnitOwner[MCF_UnitData] = (Owner of MCF_Target)
            • Set MCF_InternalClock[MCF_UnitData] = MCF_Duration[MCF_Level]
            • Unit Group - Add MCF_Target to MCF_GroupControlled
            • Unit - Change ownership of MCF_Target to MCF_CastOwner and Change color
            • Special Effect - Create a special effect attached to the MCF_AttachSFX of MCF_Target using MCF_SFXControlled
            • Special Effect - Destroy (Last created special effect)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (MCF_LoopTrigger is on) Equal to False
              • Then - Actions
                • Trigger - Turn on MCF_LoopTrigger
              • Else - Actions
          • Else - Actions



    The tests on the spell have proven it to work reliably, and the logic in the triggers is sound.

    Status:


    • Approved