Spell Mass Hex - GUI MUI

lindenkron

You can change this now in User CP
Reaction score
102
Major flaw discovered. It's back on the drawingboard.

Wouldn't be supprised if this has already been made. So no need to mention it :rolleyes:

Anyway:

Mass Hex

This spell was made because of nabbig2 requesting help with it in a thread

Pros
  • It should be Leakless
  • It should be MUI
  • It should be quiet easy to Import
  • It should be quiet easy to modify (the few things that might need modification in such a spell)

What can be easely modified is:
  • Ammount of enemies hexed.
  • Duration of time hexed (in the dummy spell).
  • How large a range the hex spell reaches.

Cons
Give me some I can add to a list. Or fix.

Guide to importing:
The 10 easy steps.
  1. Open the attached map in your World Editor.
  2. Open your own map in your World Editor.
  3. Go to your map. And 'Check' "Automatically create unknown variables while pasting trigger data" This can be found at: File -> Prefernces -> General Tap (First one)
  4. Open the attached map.
  5. Go to F6 and Copy (Ctrl + C) Paste (Ctrl + V) all the custom Units into your map.
  6. Repeat 4 and 5, just with the custom Abilities (F6)
  7. Open the attached map.
  8. Select the triggers called: 'HexCast' & 'HexStart' copy them.
  9. Open your map, paste the Triggers in.
  10. Test your map.

Screenshot:
fjkc4g.jpg

Booring code:
Trigger:
  • HexCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Hex
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HexCustomValue Less than or equal to 1000
        • Then - Actions
          • Set HexCustomValue = (HexCustomValue + 1)
        • Else - Actions
          • Set HexCustomValue = 0
      • -------- Units hexed. Indicated by HexMax[1] = Level 1. HexMax[2] = Level 2. --------
      • -------- Ammount of time hexed is set in the CUSTOM SPELL: Dummy Spell - Hex --------
      • Set HexMax[1] = 3
      • Set HexMax[2] = 5
      • Set HexMax[3] = 7
      • -------- The range of which enemies are hexed in --------
      • Set HexRange[1] = 500.00
      • Set HexRange[2] = 500.00
      • Set HexRange[3] = 500.00
      • -------- Set Variables used. --------
      • Set HexCaster[HexCustomValue] = (Triggering unit)
      • Set HexWait[HexCustomValue] = 0.00
      • Set HexWaitTime[HexCustomValue] = ((Real(HexMax[(Level of Mass Hex for (Triggering unit))])) x 0.05)
      • Set HexRounds[HexCustomValue] = 1
      • -------- Adds a unit to a group, to start the effect itself --------
      • Set HexTempLocation1 = (Center of (Playable map area))
      • Unit - Create 1 Dummy Unit for (Owner of HexCaster[HexCustomValue]) at HexTempLocation1 facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to HexCustomValue
      • Unit Group - Add (Last created unit) to HexDummyGroup
      • Custom script: call RemoveLocation (udg_HexTempLocation1)

Trigger:
  • HexStart
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (Number of units in HexDummyGroup) Greater than 0
    • Actions
      • Unit Group - Pick every unit in HexDummyGroup and do (Actions)
        • Loop - Actions
          • Set HexCValue = (Custom value of (Picked unit))
          • Set HexWait[HexCValue] = (HexWait[HexCValue] + 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HexWait[HexCValue] Less than or equal to HexWaitTime[HexCValue]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HexRounds[HexCValue] Less than or equal to HexMax[(Level of Mass Hex for HexCaster[HexCValue])]
                • Then - Actions
                  • Set HexRounds[HexCValue] = (HexRounds[HexCValue] + 1)
                  • Set HexTempLocation1 = (Position of HexCaster[HexCValue])
                  • Set HexTempGroup1 = (Units within HexRange[(Level of Mass Hex for HexCaster[HexCValue])] of HexTempLocation1 matching (((Matching unit) Not equal to HexCaster[HexCValue]) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of HexC
                  • Set HexTempGroup2 = (Random 1 units from HexTempGroup1)
                  • Unit Group - Pick every unit in HexTempGroup2 and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is in HexProtectGroup) Equal to False
                        • Then - Actions
                          • Unit Group - Add (Picked unit) to HexProtectGroup
                          • Set HexTempLocation2 = (Position of (Picked unit))
                          • Unit - Create 1 Dummy Unit for (Owner of HexCaster[HexCValue]) at HexTempLocation2 facing HexTempLocation2
                          • Unit - Add Dummy Spell - Hex to (Last created unit)
                          • Unit - Set level of Dummy Spell - Hex for (Last created unit) to (Level of Mass Hex for HexCaster[HexCValue])
                          • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
                          • Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
                          • Custom script: call RemoveLocation (udg_HexTempLocation2)
                        • Else - Actions
                          • Set HexWait[HexCValue] = (HexWait[HexCValue] - 0.05)
                          • Set HexRounds[HexCValue] = (HexRounds[HexCValue] - 1)
                  • Custom script: call DestroyGroup (udg_HexTempGroup2)
                  • Custom script: call DestroyGroup (udg_HexTempGroup1)
                  • Custom script: call RemoveLocation (udg_HexTempLocation1)
                • Else - Actions
            • Else - Actions
              • Unit Group - Pick every unit in HexProtectGroup and do (Actions)
                • Loop - Actions
                  • Unit Group - Remove (Picked unit) from HexProtectGroup
              • Unit - Remove (Picked unit) from the game
              • Unit Group - Remove (Picked unit) from HexDummyGroup
              • Set HexWait[HexCValue] = 0.00

Edit: Temporary Removed.

Hope atleast nabbig2 can get use of it :rolleyes:
Enjoy,
-Lindenkron
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
why are you doing it so complicated??
isnt it easier to just create dummy units for random units around him and order them to cast hex?!?

PS: you could do this spell in 2 mins while making it MUI with unlimited instances
 

lindenkron

You can change this now in User CP
Reaction score
102
why are you doing it so complicated??
isnt it easier to just create dummy units for random units around him and order them to cast hex?!?

PS: you could do this spell in 2 mins while making it MUI with unlimited instances

Do it then. And show me the code, because I'm having a killer pain fixing what ever it is this spell don't understand.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
i know it leaks but here you are

Trigger:
  • HexCast
    • Events
      • Unit - A unit starts the effect of an Ability
    • Conditions
      • (Ability being cast) Equal to Mass Hex
    • Actions
      • Unit Group - Pick every unit in (Random (1 + (2 x (Level of Mass Hex for (Triggering unit)))) units from (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing default degrees
          • Unit - Add Dummy Spell - Hex to (Last created unit)
          • Unit - Set level of Dummy Spell - Hex for (Last created unit) to (Level of Mass Hex for (Triggering unit))
          • Unit - Order (Last created unit) to Orc-Shadow Hunter - 'Hex' (Picked unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
sorry that it took so long i had to translate ger into eng -.-
EDIT2: now it works i hope :)
 

wraithseeker

Tired.
Reaction score
122
This is soooooo complicated, I have a template for a AOE / MASS whatever you need vJass code for this which is so simple.

Some comments

It's quite and not quiet
It's amount and not ammount
 

lindenkron

You can change this now in User CP
Reaction score
102
EDIT: ok sry does not work... :D
I wouldnt be supprised if there's another way to do this then what I'm doing. But people should feel free to add suggestions on it. Ofcause in MUI.

This is soooooo complicated, I have a template for a AOE / MASS whatever you need vJass code for this which is so simple.

Some comments

It's quite and not quiet
It's amount and not ammount

Spare me the sarcasm please.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
now it works..
 

Attachments

  • Masshexnew.w3x
    19.4 KB · Views: 234

lindenkron

You can change this now in User CP
Reaction score
102
now it works..

Ye it works for instant hexing, not what I was trying to achieve. Was trying to achieve delayed hexing. (sorry for not responding until now, was up buying some food).

So they aren't all hexed at once. To achieve a "Hex one, then other" kind of hexing. Hence, why I used 1 second channeling on channel.

a dummy hexes a random unit near the hero, and repeats this 2 more times? Thanks.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I bet you if you import this into a TD, give it to a tower, and make the tower use the Hex, all the creeps attack the tower.
 

lindenkron

You can change this now in User CP
Reaction score
102
I bet you if you import this into a TD, give it to a tower, and make the tower use the Hex, all the creeps attack the tower.

Rofl, that made me laugh. I mean, I don't know if it's true or not. But how in the name of god did even come across such a conclusin? For a matter that havn't been debated? :p

You're entertaining mate :D
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Feedback TD v1.0, look it up ;) !
Hex Tower's "Uber Hex" skill.
If you don't order the creeps to move after getting hexxed they just sit there and attack the hexxing tower.
Then proceed to attack all your other towers.
 

lindenkron

You can change this now in User CP
Reaction score
102
Feedback TD v1.0, look it up ;) !
Hex Tower's "Uber Hex" skill.
If you don't order the creeps to move after getting hexxed they just sit there and attack the hexxing tower.
Then proceed to attack all your other towers.

But.. this has nothing to do with a TD etc? It was for a hero spell ? :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top