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
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.
- Open the attached map in your World Editor.
- Open your own map in your World Editor.
- 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)
- Open the attached map.
- Go to F6 and Copy (Ctrl + C) Paste (Ctrl + V) all the custom Units into your map.
- Repeat 4 and 5, just with the custom Abilities (F6)
- Open the attached map.
- Select the triggers called: 'HexCast' & 'HexStart' copy them.
- Open your map, paste the Triggers in.
- Test your map.
Screenshot:
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
- If - Conditions
- -------- 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)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Custom script: call DestroyGroup (udg_HexTempGroup2)
- Custom script: call DestroyGroup (udg_HexTempGroup1)
- Custom script: call RemoveLocation (udg_HexTempLocation1)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Unit Group - Pick every unit in HexProtectGroup and do (Actions)
- Loop - Actions
- Unit Group - Remove (Picked unit) from HexProtectGroup
- Loop - Actions
- Unit - Remove (Picked unit) from the game
- Unit Group - Remove (Picked unit) from HexDummyGroup
- Set HexWait[HexCValue] = 0.00
- Unit Group - Pick every unit in HexProtectGroup and do (Actions)
- If - Conditions
- Loop - Actions
- Unit Group - Pick every unit in HexDummyGroup and do (Actions)
- Events
Edit: Temporary Removed.
Hope atleast nabbig2 can get use of it
Enjoy,
-Lindenkron