• 🏆 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!

Mind Control Field v1.1

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:

CHANGE LOGS:
1.1: Added a Condition to allow filtering by user, added extra SFX to know a controlled unit (can be set to empty string to create no effect)
1.0: First Release

CREDIT:
Unit Indexer by Bribe
Contents

Mind Control Field (Map)

Level 24
Joined
Feb 9, 2009
Messages
1,783
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.
 
Level 24
Joined
Feb 9, 2009
Messages
1,783
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:

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
 
Hey i need to know if ur system is safe, Mind Control System V1.01

I used this system and it causes desync after its used in game some ppl drop. Do you know why it happens? I think the Code is similar

I haven't tested this for multiplayer, so I cannot assert a guarantee of zero desync. However, as far as code-wise goes, I noticed zero sources of potential desync in my work. So, I'd say it's desync free (unless 1.32 introduces new desync problems I am not aware of)

I cannot confirm MCS by redscores code though, you should ask him for that.
 
Last edited:
Level 11
Joined
Jul 17, 2013
Messages
544
I haven't tested this for multiplayer, so I cannot assert a guarantee of zero desync. However, as far as code-wise goes, I noticed zero sources of potential desync in my work. So, I'd say it's desync free (unless 1.32 introduces new desync problems I am not aware of)

I cannot confirm MCS by redscores code though, you should ask him for that.


Also can this spell be used with unit indexer from there? Trigger Viewer | HIVE

I m using unit indexer alreday for knockback and its kinda another than your one and i guess u cant have two diff indexers
 

Attachments

  • Screenshot_2020-05-22-05-16-29.png
    Screenshot_2020-05-22-05-16-29.png
    727.4 KB · Views: 69
  • Screenshot_2020-05-22-05-16-02.png
    Screenshot_2020-05-22-05-16-02.png
    620.3 KB · Views: 52
  • Screenshot_2020-05-22-05-16-23.png
    Screenshot_2020-05-22-05-16-23.png
    678.7 KB · Views: 73
Top