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

Holy Dragging Spell v1.05

Holy Dragging Spell by Maker.

I created this spell for Revolve, who then wanted this spell to be uploaded.

The caster of the spell conjures a becon of holy magic. The beacon pulls all units except the caster towards it's center. If a unit enters the pull radius while the beacon is active, it also starts to get pulled towards the center. Units inside the radius get slowed down to make escaping more difficult, but with frantic clicking they can make it :)

If a unit gets pulled too close to the beacon, it will damage enemies and heal allies. If the caster stops casting the spell, it disappears immediately.

The spell is MUI.

You can customize:

*Damage
*Duration
*Pull speed
*Damage radius
*Pull radius

Credits:
Revolve for a good spell idea.
Vexorian for custom dummy unit model.


v1.00
First release

v1.01
Using SetUnitX and SetUnitY instead of Move unit instantly. The spell now constantly pulls, which is cool.
Hotkey fixed.
Set pull speed to customizeable variable.

v1.02
Added pathing walkability check when moving units.
Fixed child hashtable clearing bug.
Fixed location leak.

v1.03
Fixed the issue of units no being picked when they entered the AoE of the spell after the spell was cast.
The slow buff on units is now removed when the spell ends.
Dummy spells and unit renamed to make it easier to differentiate them from standard unit/abilities.
Replaced some (picked unit) and (triggering unit) with variables.

v1.05
Improved dummy settings
Made dragging allies optional
Added configurable variables for dummy unit type, ability and buff for easier importing
Added importing instructions



  • Holy Dragging Spell Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- -------------------- --------
      • Hashtable - Create a hashtable
      • Set Holy_Dragging_Spell_Hash = (Last created hashtable)
      • -------- -------------------- --------
      • Set HDS_Ability = Holy Dragging Spell
      • Set HDS_Dummy = Footman - (HDS_Dummy)
      • Set HDS_Slow_Buff = Slow - (HDS)
      • Set HDS_Pulls_Allies = False
      • -------- -------------------- --------
      • Set HDS_Duration = 6.00
      • Set HDS_Damage = 50.00
      • Set HDS_Drag_Speed = 4.50
      • Set HDS_Catch_Range = 500.00
      • Set HDS_Damage_Range = 175.00
      • -------- -------------------- --------
  • Holy Dragging Spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to HDS_Ability
    • Actions
      • Set Temp_Unit_1 = (Triggering unit)
      • -------- -------------------- --------
      • Set Temp_Loc_1 = (Target point of ability being cast)
      • -------- -------------------- --------
      • -------- Create a dummy unit at the center of the beacon --------
      • -------- -------------------- --------
      • Unit - Create 1 HDS_Dummy for Neutral Passive at Temp_Loc_1 facing Default building facing degrees
      • Set Temp_Unit_3 = (Last created unit)
      • -------- -------------------- --------
      • -------- Scale the dummy, so the special effect gets scaled too --------
      • -------- -------------------- --------
      • Animation - Change Temp_Unit_3's size to (200.00%, 200.00%, 200.00%) of its original size
      • -------- -------------------- --------
      • -------- Set the time for the beacon --------
      • -------- -------------------- --------
      • Unit - Add a HDS_Duration second Generic expiration timer to Temp_Unit_3
      • -------- -------------------- --------
      • Unit Group - Add Temp_Unit_3 to Holy_Dragging_Spell_Lightning
      • -------- -------------------- --------
      • -------- Store things we need to know about the spell --------
      • -------- -------------------- --------
      • -------- Timer used for the life time of the beacon --------
      • Hashtable - Save (HDS_Duration + 0.01) as (Key timer) of (Key (Last created unit)) in Holy_Dragging_Spell_Hash
      • -------- Store the caster of the beacon --------
      • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Last created unit)) in Holy_Dragging_Spell_Hash
      • -------- Store the beacon unit for the triggering unit --------
      • Hashtable - Save Handle Of(Last created unit) as (Key beacon) of (Key (Triggering unit)) in Holy_Dragging_Spell_Hash
      • -------- -------------------- --------
      • Set Temp_Group_1 = (Units within HDS_Catch_Range of Temp_Loc_1 matching (((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to Temp_Unit_1)) and (((Matching unit) Not equal to Temp_Unit_1) and (((Unit-type of (Matching unit)) Not equal to Footman - (HDS_
      • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_2 = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_2 belongs to an enemy of (Triggering player)) Equal to True
            • Then - Actions
              • Set Temp_Loc_2 = (Position of Temp_Unit_2)
              • Set Temp_Real_2 = (Angle from Temp_Loc_2 to Temp_Loc_1)
              • -------- -------------------- --------
              • -------- Create a dummy that casts slow on picked unit --------
              • -------- -------------------- --------
              • Unit - Create 1 HDS_Dummy for Neutral Passive at Temp_Loc_2 facing Temp_Real_2 degrees
              • Unit - Order (Last created unit) to Undead Necromancer - Cripple Temp_Unit_2
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • -------- -------------------- --------
              • Unit Group - Add Temp_Unit_2 to Holy_Dragging_Spell_Group
              • -------- -------------------- --------
              • Hashtable - Save HDS_Drag_Speed as (Key escape_timer) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save Temp_Real_2 as (Key angle) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save ((HDS_Damage x (1.00 x 0.03)) x (Real((Level of Holy Dragging Spell for Temp_Unit_1)))) as (Key damage) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save Handle OfTemp_Loc_1 as (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save (Distance between Temp_Loc_1 and Temp_Loc_2) as (Key distance) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save Handle OfTemp_Unit_1 as (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save Handle OfTemp_Unit_3 as (Key beacon) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • -------- -------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • -------- -------------------- --------
            • Else - Actions
      • -------- -------------------- --------
      • -------- Turn on triggers that need to be turned on --------
      • -------- -------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Holy Dragging Spell Group <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Holy Dragging Spell Group <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Holy Dragging Spell Lightning <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Holy Dragging Spell Lightning <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Holy Dragging Spell Cancel <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Holy Dragging Spell Cancel <gen>
        • Else - Actions
      • -------- -------------------- --------
      • -------- Remove leak --------
      • -------- -------------------- --------
      • Custom script: call DestroyGroup(udg_Temp_Group_1)
      • -------- -------------------- --------
  • Holy Dragging Spell Group
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Holy_Dragging_Spell_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Unit_2 = (Load (Key beacon) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
          • Set Temp_Real_1 = (Load (Key distance) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash)
          • -------- -------------------- --------
          • -------- If beacon isn't there or unit has escaped the dragging distance, remove from group --------
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Temp_Unit_2 is alive) Equal to True
              • Temp_Real_1 Less than HDS_Catch_Range
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real_1 Greater than or equal to 33.00
                • Then - Actions
                  • Set Temp_Loc_1 = (Position of Temp_Unit_1)
                  • -------- -------------------- --------
                  • Set Temp_Real_3 = (Load (Key angle) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash)
                  • -------- -------------------- --------
                  • Set Temp_Real_4 = (X of Temp_Loc_1)
                  • Set Temp_Real_5 = (Y of Temp_Loc_1)
                  • -------- -------------------- --------
                  • Set Temp_Real_4 = (Temp_Real_4 + (HDS_Drag_Speed x (Cos(Temp_Real_3))))
                  • Set Temp_Real_5 = (Temp_Real_5 + (HDS_Drag_Speed x (Sin(Temp_Real_3))))
                  • -------- -------------------- --------
                  • Set Temp_Loc_2 = (Point(Temp_Real_4, Temp_Real_5))
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at Temp_Loc_2 of type Walkability is off) Equal to False
                    • Then - Actions
                      • Custom script: call SetUnitX(udg_Temp_Unit_1, udg_Temp_Real_4)
                      • Custom script: call SetUnitY(udg_Temp_Unit_1, udg_Temp_Real_5)
                    • Else - Actions
                  • -------- -------------------- --------
                  • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                  • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                  • -------- -------------------- --------
                • Else - Actions
              • -------- -------------------- --------
              • -------- Check if unit´is close enough to the beacon to be damaged or healed --------
              • -------- -------------------- --------
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Loc_2 = (Load (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between Temp_Loc_1 and Temp_Loc_2) Less than HDS_Damage_Range
                • Then - Actions
                  • Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
                  • -------- -------------------- --------
                  • -------- Damage enemies, heal allies --------
                  • -------- -------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Owner of Temp_Unit_1) is an enemy of (Owner of Temp_Unit_2)) Equal to True
                    • Then - Actions
                      • Unit - Cause Temp_Unit_2 to damage Temp_Unit_1, dealing (Load (Key damage) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash) damage of attack type Chaos and damage type Normal
                    • Else - Actions
                      • Unit - Set life of Temp_Unit_1 to ((Life of Temp_Unit_1) + ((Max life of Temp_Unit_1) x (0.01 / 8.00)))
                • Else - Actions
              • -------- -------------------- --------
              • Hashtable - Save (Angle from Temp_Loc_1 to Temp_Loc_2) as (Key angle) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • Hashtable - Save (Distance between Temp_Loc_2 and Temp_Loc_1) as (Key distance) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • -------- -------------------- --------
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
            • Else - Actions
              • Set Temp_Loc_2 = (Load (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
              • Custom script: call RemoveLocation(udg_Temp_Loc_2)
              • -------- -------------------- --------
              • Unit - Remove HDS_Slow_Buff buff from (Picked unit)
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • -------- -------------------- --------
              • Unit Group - Remove Temp_Unit_1 from Holy_Dragging_Spell_Group
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Holy_Dragging_Spell_Group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
  • Holy Dragging Spell Lightning
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Holy_Dragging_Spell_Lightning and do (Actions)
        • Loop - Actions
          • Set Temp_Unit_1 = (Picked unit)
          • Set Temp_Unit_2 = (Load (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
          • Set Temp_Real_1 = (Load (Key timer) of (Key (Picked unit)) from Holy_Dragging_Spell_Hash)
          • -------- -------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real_1 Greater than 0.01
              • (Temp_Unit_1 is alive) Equal to True
            • Then - Actions
              • Set Temp_Loc_1 = (Position of Temp_Unit_1)
              • Set Temp_Group_1 = (Units within HDS_Catch_Range of Temp_Loc_1 matching (((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to Temp_Unit_2)) and (((Matching unit) Not equal to Temp_Unit_1) and (((Unit-type of (Matching unit)) Not equal to Footman - (HDS_
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Group_1 is empty) Equal to False
                • Then - Actions
                  • Unit Group - Pick every unit in Temp_Group_1 and do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit_3 = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Temp_Unit_3 is in Holy_Dragging_Spell_Group) Equal to False
                        • Then - Actions
                          • Set Temp_Loc_2 = (Position of Temp_Unit_3)
                          • -------- -------------------- --------
                          • Unit - Create 1 Footman - (HDS_Dummy) for Neutral Passive at Temp_Loc_2 facing Temp_Real_2 degrees
                          • Custom script: call UnitAddAbility(GetLastCreatedUnit(), 'Aloc')
                          • Unit - Order (Last created unit) to Undead Necromancer - Cripple Temp_Unit_3
                          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                          • -------- -------------------- --------
                          • Set Temp_Real_2 = (Angle from Temp_Loc_2 to Temp_Loc_1)
                          • -------- -------------------- --------
                          • Unit Group - Add Temp_Unit_2 to Holy_Dragging_Spell_Group
                          • -------- -------------------- --------
                          • Hashtable - Save Handle OfTemp_Loc_1 as (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • Hashtable - Save Temp_Real_2 as (Key angle) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • Hashtable - Save HDS_Drag_Speed as (Key escape_timer) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • Hashtable - Save (Distance between Temp_Loc_1 and Temp_Loc_2) as (Key distance) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • Hashtable - Save ((HDS_Damage x (1.00 x 0.03)) x (Real((Level of Holy Dragging Spell for Temp_Unit_2)))) as (Key damage) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • Hashtable - Save Handle OfTemp_Unit_1 as (Key beacon) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • Hashtable - Save Handle OfTemp_Unit_2 as (Key caster) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
                          • -------- -------------------- --------
                          • Unit Group - Add Temp_Unit_3 to Holy_Dragging_Spell_Group
                          • -------- -------------------- --------
                          • Custom script: call RemoveLocation(udg_Temp_Loc_2)
                          • -------- -------------------- --------
                          • Trigger - Turn on Holy Dragging Spell Group <gen>
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_Temp_Loc_1)
                • Else - Actions
                  • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • Custom script: call DestroyGroup(udg_Temp_Group_1)
              • -------- -------------------- --------
              • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the origin of Temp_Unit_1 using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- -------------------- --------
              • Hashtable - Save (Temp_Real_1 - 0.25) as (Key timer) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash
            • Else - Actions
              • Set Temp_Loc_1 = (Load (Key center) of (Key (Picked unit)) in Holy_Dragging_Spell_Hash)
              • Custom script: call RemoveLocation(udg_Temp_Loc_1)
              • -------- -------------------- --------
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Holy_Dragging_Spell_Hash
              • -------- -------------------- --------
              • Unit Group - Remove Temp_Unit_1 from Holy_Dragging_Spell_Lightning
              • -------- -------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Holy_Dragging_Spell_Lightning is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                  • Trigger - Turn off Holy Dragging Spell Cancel <gen>
                • Else - Actions
  • Holy Dragging Spell Cancel
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Holy Dragging Spell
    • Actions
      • Unit - Kill (Load (Key beacon) of (Key (Triggering unit)) in Holy_Dragging_Spell_Hash)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Holy_Dragging_Spell_Hash


Keywords:
holy spell beacon pull drag
Contents

Holy Dragging Spell (Map)

Reviews
16:52, 27th Nov 2009 TriggerHappy: Approved.
Level 19
Joined
Feb 4, 2009
Messages
1,313
it is either not MUI or bugged
sometimes I cast it without anything happening

edit:
hashtables :grin:
of cause it's bugged
and 4 triggers for a channel spell....
you could check if the order is == channel and merge the other trigger somehow (usually every spell is possible with 2 triggers but sometimes 3 are easier)

however all the other stuff seems to be good
you remove leaks
LOTS of documentation
new idea
ingame screenshot


you don't have to make it with indexing but fix the bug mentioned on top
(gl finding it)
I just don't like hashtables
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
it is either not MUI or bugged
sometimes I cast it without anything happening

After testing a bit, I coudn't make it bug. Could you tell when it bugs for you? I'll try to test some more.

hashtables of cause it's bugged
and 4 triggers for a channel spell....
you could check if the order is == channel and merge the other trigger somehow (usually every spell is possible with 2 triggers but sometimes 3 are easier)

I've never had anything bug due to it being made with hashtables, and I've done a lot of spells. Don't let your bias cloud your vision.

The first trigger fires when the spell is cast, it is needed.
The second trigger takes care of dragging units in, it's needed.
The third trigger adds units entering the area into unit group of units being dragged. It also creates special effects. The time interval of trigger #3 is much greater than the interval of trigger #2 (0,25 s vs 0,03 s). It's actually better to divide these into two different trigger, to make the spell require less CPU time.
The fourth trigger just cancels the spell. Can't do without it.

To me it sounds like you don't know what you're talking about. The number of triggers by itself doesn't make a spell any better/worse.

Saying "OMG it haz 4 trigggers, make it less" isn't worth anything. If you can give some advice and/or idea how to actually squezze it in three triggers without compromizing performance too much, I'm all ears.

I thank you for taking the time to have a look at the spell.
 
Level 8
Joined
Jun 18, 2007
Messages
214
Well I like the spell, effects are good, and executed well. Though I really don't like GUI, 'cause of 1000 of variables and triggers.

I would just give one comment on how to improve:

- Try using SetUnitX(whichUnit, newX) and SetUnitY(whichUnit, newY) instead using Unit - Move Instantly. It's really simple to use and units (ofc. if the speed is reasonable) can still move and be dragged (pulled), and it doesn't reset their commands. Not to mention it looks nicer :p.

Anyway my rating for this spell would be 4/5. :)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
put that
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Holy_Dragging_Spell_Lightning is empty) Equal to True
    • Then - Actions
      • Trigger - Turn off (This trigger)
    • Else - Actions
to the end of the trigger
so it will be executed only once and have the same effect

Now it gets executed as many times as there are units in the group. It only gets executed when a unit is removed form the group. 6 units in a group -> executed 6 times per spell cast.

If it is at the end of the trigger, it gets executed 1/(0.03)*6=200 times per spell cast. This is for the "group trigger". For the other trigger, it is one time per spell cast as it is now, or 1/(0.25)*6=24 times per spell cast.

So no, I won't put it at the end of the trigger.

your variable names are weird
sometimes you call the HDS_ and sometimes Holy_Dragging_Spell_
Typo: Holy_Daragging_Spell_Group

All HDS_something are what you can configure. But yeah, I guess they could all begin with HDS_

the hotkey is wrong
you wrote Q but it is B

Thanks for pointing that out.

...check if the order of the caster is equal to channel and

That would be slower solution than what it is now. There's absolutely no need to squeeze it in three triggers, unless there's some performance gain to be had by doing so.

if random integer between x and y equal to x

What do you mean by that? What do I need to randomize?

-hashtables are SLOW
-arrays are FAST

In my eyes hashtables are fast enough.

-making the same unit be able to cast a spell more then once at a runtime is much easier with arrays...

Yeah, but this spell is meant to have longer cooldown than it's duration is. Otherwise it would be way overpowered.

Thanks for your comments :thumbs_up:

- Try using SetUnitX(whichUnit, newX) and SetUnitY(whichUnit, newY) instead using Unit - Move Instantly.

Thanks, I will look into it.

========================================================================

Update:

v1.01
Using SetUnitX and SetUnitY instead of Move unit instantly. The spell now constantly pulls, which is cool.
Hotkey fixed.
Set pull speed to customizeable variable.

That SetUnitX/Y tip was golden. Awesome really. +rep coming your way.
 
Level 5
Joined
Oct 9, 2008
Messages
112
Hi,

spell looks realy nice, but i found a big bug.
If you set the spell point out of the map, in the black area around the map, the moving units, going to be bugged. please fix it!
BTW. nice idea.

Looks nice :)thumbs_up:)
Good Coding :)thumbs_up:)
Mui :)thumbs_up:)
Some Bugs :)thumbs_down:)
Easy to Customize :)thumbs_up:)

So my rate is >> 4/5 <<

enjoy:ned:
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
TriggerHappy said:
TriggerHappy:

You leak temp_loc_1 inside your cast trigger.

The name is very lacking and the spell only costs 5 mana.

Seriously this is a reason for not being approved?
The name can be edited by any user who downloads it and same for the mana cost.
And for the leak,ok..Maker can fix it...
BUT I have seen approved spells leaking...and not only once.

APPROVE THIS PLEASE
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
TriggerHappy said:
You leak temp_loc_1 inside your cast trigger.

The name is very lacking and the spell only costs 5 mana.

I updated the mana cost to 125, it was 5 for testing purposes and forgot to change it.

It does not leak to my knowledge, I save the handle of Temp_Loc_1 for all units that are picked (key = center), and then remove the location when the spell ends in Holy Dragging Spell Group -trigger.
 
Last edited:
Level 6
Joined
Oct 31, 2008
Messages
229
generally monitored the memory consumpion in bytes for wc3. in normall, it takes memory in a special space for replay, but i used do not ssve replay. after that it shouldnt increase in space, but it did (a eakless map, does never increase in space after Donotsavereplay())
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
generally monitored the memory consumpion in bytes for wc3. in normall, it takes memory in a special space for replay, but i used do not ssve replay. after that it shouldnt increase in space, but it did (a eakless map, does never increase in space after Donotsavereplay())

that's because every time you create a unitgroup and destroy it it will leak a little memory
you can't do much about it though
JASS functions don't create unitgroups but add all units passing a certain filter to a group instead of creating the group and then adding all the units to it
of cause you can access these enumeration functions in custom script but it might be slow in a special case
  • Custom Script: call GroupEnumUnitsInRange(udg_Group, udg_x, udg_y, udg_aoe, null)
"null" is the place for the filter function
usually you create a function in JASS which is like the following
JASS:
function  filter takes nothing returns boolean
    return  GetUnitLife(GetFilterUnit())>0.405
endfunction
and you convert it to a filter using "Condition(function filter)" and replace the "null" with it
but you can't declare functions in GUI so you will have to use the null-filter version
actually this is damn fast (faster than anything else) if there is no unit, or only a few units which would pass the filter anyway, around but if there are MANY (50+) units within the area of effect which do NOT fullfill the given conditions it will be slower
this is because if you use a null-filter all units are added to the group and you have to check every unit in the pick-all-units-in-group-loop
checking within the condition is waaaay faster
you also could just make a few JASS filter functions and continue using them in GUI but some dumbass will mostlikely reply that if you are using JASS already you should make the whole spell with JASS and if you do it you will have to switch to vJASS because another dumbass will reply that it is much easier than JASS (which is true anyway but requires JNGP) and so it would not be GUI anymore

Hi Ive tried to add it to my map, and I dont get it work

you mostlikely forgot something
are all triggers working?
did you check if the ability codes are correct?
what about the imports?
and dummy units? (but if the slow works it's unlikely that you forgot to copy them x)
 
Level 8
Joined
Jul 14, 2010
Messages
235
If I want this awesome spell to be 3 levels instead of 2, can I just add one more level at the ability in "Object Editor", and then the triggers will multiply dmg/duration/speed etc. with the ability level? Thanks
 
Level 9
Joined
Jun 22, 2012
Messages
472
hello ! i imported your spell, everything seems to work fine but i got one problem. the spell description says that allies should also get healed, well they don't :eek: any idea what's the problem?

Yes, same problem. Even with the test map. And I'm looking for a solution too ^^

EDIT : Allies in the area of the casted spell aren't added to the HDS group.
 
Last edited:
Top