• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Fire Lead [1.01]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: xorkatoss
Firelead
Fires a shackles to a target, so Batrider can move opponent as he wants, dealing 10/15/20 damage
per 100 moved distance if target is an enemy.
Lasts 8/8.5/9 seconds.
Cooldown 0.


1.00a - First Download.
1.00b - Removed crash error which is because trigger was named in Russian. Also moved "How To copy" trigger in another folder. Updated a screen-shot.
1.01 - Now allied units picked in lasso can ran away from lasso. I am using coordinates now instead of location, now it uses JASS(may be someone could help with making it GUI?). When bat-ride is die a lasso cut. Removed MAJOR bug with zLoc. Some configurations(which are not array) is now in INI trigger and is not set each time when spell cast. Added some another configurations. Removed not very important bug with collision of unit.


The triggers now is absolutely another, so I removed triggers from and can not post its.


Keywords:
fire, lead, batrider, bat, firelead, move, range
Contents

Fire lead [1.01] (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Moderator: Pharaoh_ Date: 12:06, 18th May 2012 You are using the old way of indexing, which is not recommended for an efficient recycling. Spell section's standards have been...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

160036-albums4747-picture55861.png

Moderator: Pharaoh_
Date: 12:06, 18th May 2012

Review
You are using the old way of indexing, which is not recommended for an efficient recycling. Spell section's standards have been updated and so should your method. Don't create local variables every 0.03 seconds, use normal, global variables.
Remove the locations in their respective branch, not an Else branch of a random if-then-else.
When I tried to modify something within the map, the classic editor threw me errors, which led to disappearance of certain blocks in the loop trigger (the ones you create the local variables). For a GUI resource, it should be modifiable in the classic Editor. As to why they disappeared, that's the first time I witness this bug.

Needs fix.
 
Level 8
Joined
May 9, 2010
Messages
266
Sorry I can`t post triggers,as usual :(
And screen-shot is too bad because my Print Screen is not workable and I make it with help of my mobile phone :D
However the spell is MUI, I have used indexing system.
Feel free to comment and rate!
Edit: Triggers had been posted, thanks poweroll
 
Last edited:
Level 3
Joined
Apr 28, 2009
Messages
44
  • FL INI
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set zLoc = 0.00
  • FL cast spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire lead
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on FL loop <gen>
        • Else - Actions
      • Set Index[1] = (Index[1] + 1)
      • Set Index[2] = (Index[2] + 1)
      • -------- --------
      • -------- --------
      • -------- --------
      • Set FL_Caster[Index[2]] = (Triggering unit)
      • Set FL_CasterLoc[Index[2]] = (Position of (Triggering unit))
      • Set FL_Target[Index[2]] = (Target unit of ability being cast)
      • Set FL_TargetLoc[Index[2]] = (Position of (Target unit of ability being cast))
      • -------- --------
      • -------- /*/*/* --------
      • -------- --------
      • -------- --------
      • -------- --------
      • -------- /*-SETUP PART-*/ --------
      • -------- --------
      • -------- --------
      • -------- known to all duration time --------
      • Set FL_Duration[Index[2]] = (7.50 + (0.50 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • -------- damage when Batrider moves target in damage per 1 moved distance --------
      • -------- (*100 = damage per 100 moved distance) --------
      • Set FL_PercentDamage[Index[2]] = (0.05 + (0.05 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • -------- this is a range when batrider start moving his target, --------
      • Set FL_MaxDistance = 510.00
      • -------- units in this range of target point will take a damage --------
      • Set FL_DamageRange = 105.00
      • -------- a damage in those radius per second --------
      • Set FL_ExtraDamage[Index[2]] = (30.00 + (12.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
      • -------- this is a range used for blink or TP --------
      • -------- when distance beetween targets are higher than FL_CutRange --------
      • -------- the lasso will be broken --------
      • Set FL_CutRange = 950.00
      • -------- make this value less than 1.00 if you want to slow the target while moving in lasso --------
      • -------- if this value is equel to 1 the target is moving with Batrider`s speed --------
      • Set FL_SlowFactor = 1.00
      • -------- false => target doesn`t ignoring obstacles --------
      • -------- (true is good) --------
      • Set FL_CollisionBoolean[Index[2]] = True
      • -------- Boolean variable used for lightnings --------
      • -------- make False if you want to visible of lightning in FOG --------
      • Set FL_CheckVisibility = True
      • -------- Special effect used constantly on target --------
      • Set FL_StringSE = Abilities\Spells\Human\AerialShackles\AerialShacklesTarget.mdl
      • -------- Special effect used when target is in moving --------
      • Set FL_StringSE2 = Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
      • -------- --------
      • -------- /*/*/* --------
      • -------- --------
      • Set x1[Index[2]] = (X of FL_CasterLoc[Index[2]])
      • Set x2[Index[2]] = (X of FL_TargetLoc[Index[2]])
      • Set y1[Index[2]] = (Y of FL_CasterLoc[Index[2]])
      • Set y2[Index[2]] = (Y of FL_TargetLoc[Index[2]])
      • Set z1[Index[2]] = (zLoc + (Current flying height of FL_Caster[Index[2]]))
      • Set z2[Index[2]] = (zLoc + (Current flying height of FL_Target[Index[2]]))
      • Set FL_UnitDistance[Index[2]] = (Distance between FL_CasterLoc[Index[2]] and FL_TargetLoc[Index[2]])
      • Custom script: set udg_FL_Lightning[udg_Index[2]] = AddLightningEx("LEAS",udg_FL_CheckVisibility, udg_x1[udg_Index[2]],udg_y1[udg_Index[2]],udg_z1[udg_Index[2]],udg_x2[udg_Index[2]],udg_y2[udg_Index[2]], udg_z2[udg_Index[2]])
      • Unit - Pause FL_Target[Index[2]]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FL_CollisionBoolean[Index[2]] Equal to True
        • Then - Actions
          • Unit - Turn collision for FL_Target[Index[2]] Off
        • Else - Actions
      • Special Effect - Create a special effect attached to the chest of FL_Target[Index[2]] using FL_StringSE
      • Set FL_SE[Index[2]] = (Last created special effect)
      • Custom script: call RemoveLocation(udg_FL_CasterLoc[udg_Index[2]])
      • Custom script: call RemoveLocation(udg_FL_TargetLoc[udg_Index[2]])
  • FL loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Index[3]) from 1 to Index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FL_Duration[Index[3]] Greater than or equal to 0.00
            • Then - Actions
              • Set FL_Duration[Index[3]] = (FL_Duration[Index[3]] - 0.03)
              • Set FL_CasterLoc[Index[3]] = (Position of FL_Caster[Index[3]])
              • Set FL_TargetLoc[Index[3]] = (Position of FL_Target[Index[3]])
              • Set x1[Index[3]] = (X of FL_CasterLoc[Index[3]])
              • Set x2[Index[3]] = (X of FL_TargetLoc[Index[3]])
              • Set y1[Index[3]] = (Y of FL_CasterLoc[Index[3]])
              • Set y2[Index[3]] = (Y of FL_TargetLoc[Index[3]])
              • Set z1[Index[3]] = (zLoc + (Current flying height of FL_Caster[Index[3]]))
              • Set z2[Index[3]] = (zLoc + (Current flying height of FL_Target[Index[3]]))
              • Custom script: call MoveLightningEx(udg_FL_Lightning[udg_Index[3]],udg_FL_CheckVisibility,udg_x1[udg_Index[3]],udg_y1[udg_Index[3]],udg_z1[udg_Index[3]], udg_x2[udg_Index[3]],udg_y2[udg_Index[3]],udg_z2[udg_Index[3]])
              • Custom script: Unknown
              • Set FL_UnitDistance[Index[3]] = (Distance between FL_CasterLoc[Index[3]] and FL_TargetLoc[Index[3]])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FL_UnitDistance[Index[3]] Greater than or equal to FL_MaxDistance
                • Then - Actions
                  • Set FL_OffsetedPoint[Index[3]] = (FL_TargetLoc[Index[3]] offset by ((Current movement speed of FL_Caster[Index[3]]) x (FL_SlowFactor / 33.00)) towards (180.00 + (Angle from FL_CasterLoc[Index[3]] to FL_TargetLoc[Index[3]])) degrees)
                  • Unit - Move FL_Target[Index[3]] instantly to FL_OffsetedPoint[Index[3]]
                  • Special Effect - Create a special effect attached to the chest of FL_Target[Index[3]] using FL_StringSE2
                  • Special Effect - Destroy (Last created special effect)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (FL_Target[Index[3]] belongs to an enemy of (Owner of FL_Caster[Index[3]])) Equal to True
                    • Then - Actions
                      • Unit - Cause FL_Caster[Index[3]] to damage FL_Target[Index[3]], dealing (FL_PercentDamage[Index[3]] x (Distance between FL_TargetLoc[Index[3]] and FL_OffsetedPoint[Index[3]])) damage of attack type Spells and damage type Normal
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_FL_OffsetedPoint[udg_Index[3]])
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • FL_Duration[Index[3]] Less than or equal to 0.00
                      • (Distance between FL_CasterLoc[Index[3]] and FL_TargetLoc[Index[3]]) Greater than or equal to FL_CutRange
                • Then - Actions
                  • Lightning - Destroy FL_Lightning[Index[3]]
                  • Unit - Unpause FL_Target[Index[3]]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • FL_CollisionBoolean[Index[3]] Equal to True
                    • Then - Actions
                      • Unit - Turn collision for FL_Target[Index[3]] On
                    • Else - Actions
                  • Special Effect - Destroy FL_SE[Index[3]]
                  • Set Index[1] = (Index[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Index[1] Equal to 0
                    • Then - Actions
                      • Set Index[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
                  • Custom script: call RemoveLocation(udg_FL_CasterLoc[udg_Index[3]])
                  • Custom script: call RemoveLocation(udg_FL_TargetLoc[udg_Index[3]])
            • Else - Actions
np ;)
 
You don't really need to get the units movement speed, you can very easily just check the distances (as you did) and then move it closer, by that distance. Also as you're not using co-ordinates units cannot resist being pulled, and similarly they can not attack while being pulled, however when not being pulled they can do both.

Take into consideration:

If the unit that is pulling is -not moving- and the unit it is trying to pull is running away, when it gets out of the given radius of the drag, or rather to the limit. What'll happen to it?

Note: This is assuming that you don't pause units (I know you do, but it's not exactly good practice to do so)

Edit: Also you should get a proper screenshot, not a photograph taken with a phone/camera, there's a Print Screen button on your keyboard, please use it.

Edit 2: In other news you have a custom script "Uknown" which breaks your triggers when you try to save, also there's a problem with the "how to import" instructions, but this could also be linked to this "Unknown" custom script

Edit 3: It stacks with itself, making it twice as effective. Also it lags if you grab more than about 10 units at the same time (very rough approximation) this is also because of using points as opposed to co-ordinates
 
Level 8
Joined
May 9, 2010
Messages
266
You don't really need to get the units movement speed, you can very easily just check the distances (as you did) and then move it closer, by that distance. Also as you're not using co-ordinates units cannot resist being pulled, and similarly they can not attack while being pulled, however when not being pulled they can do both.

Take into consideration:

If the unit that is pulling is -not moving- and the unit it is trying to pull is running away, when it gets out of the given radius of the drag, or rather to the limit. What'll happen to it?

Note: This is assuming that you don't pause units (I know you do, but it's not exactly good practice to do so)

Edit: Also you should get a proper screenshot, not a photograph taken with a phone/camera, there's a Print Screen button on your keyboard, please use it.

Edit 2: In other news you have a custom script "Uknown" which breaks your triggers when you try to save, also there's a problem with the "how to import" instructions, but this could also be linked to this "Unknown" custom script

Edit 3: It stacks with itself, making it twice as effective. Also it lags if you grab more than about 10 units at the same time (very rough approximation) this is also because of using points as opposed to co-ordinates

Thank you for your review T-C.

1) I am using movement speed, because in my setup trigger I have SlowFactor.
  • -------- make this value less than 1.00 if you want to slow the target while moving in lasso --------
    • -------- if this value is equel to 1 the target is moving with Batrider`s speed --------
    • Set FL_SlowFactor = 1.00
So target may be pulled slower than Bat-rider, may be increasing speed with level. User can configure this parameters as he wants, so I decided to use movement speed.

2) Yes, originally my spell idea doesnt allow resist to be pulling.
May be I`ll make it. Because some part of idea is from dota, but in dota target can not resist.

3) Unit will pulling as well, because it depends from Bat-riders speed.

4) Why pausing unit is bad? Earlier I have been had some problems with it, but in this spell it works correctly(As I think).

5) Yes, I know about Print screen:
And screen-shot is too bad because my Print Screen is not workable and I make it with help of my mobile phone :D
This is quote from my first reply.
Sorry about that once again.

6)Yes, its because it was named in Russian language, I`ll rename trigger and update it soon.

7)I don`t have experience to use coordinates, but
  • Set x1[Index[3]] = (X of FL_CasterLoc[Index[3]])
  • Set x2[Index[3]] = (X of FL_TargetLoc[Index[3]])
  • Set y1[Index[3]] = (Y of FL_CasterLoc[Index[3]])
  • Set y2[Index[3]] = (Y of FL_TargetLoc[Index[3]])
  • Set z1[Index[3]] = (zLoc + (Current flying height of FL_Caster[Index[3]]))
  • Set z2[Index[3]] = (zLoc + (Current flying height of FL_Target[Index[3]]))
It used for custom script. Is it not coordinates?)
:vw_wtf:
 
Level 8
Joined
May 9, 2010
Messages
266
  • Custom script: local real array x3
    • Custom script: local real array y3
    • Custom script: local real array s
    • Custom script: local real f
    • Custom script: set f = udg_FL_SlowFactor
    • Custom script: set s[udg_Index[3]] = GetUnitMoveSpeed(udg_FL_Caster[udg_Index[3]])
    • Custom script: set x3[udg_Index[3]] = udg_x2[udg_Index[3]] - s[udg_Index[3]] * (f/33.33)*CosBJ(AngleBetweenPoints(udg_FL_CasterLoc[udg_Index[3]], udg_FL_TargetLoc[udg_Index[3]]))
    • Custom script: call SetUnitX(udg_FL_Target[udg_Index[3]], x3[udg_Index[3]])
    • Custom script: set y3[udg_Index[3]] = udg_y2[udg_Index[3]] - s[udg_Index[3]] * (f/33.33) * SinBJ(AngleBetweenPoints(udg_FL_CasterLoc[udg_Index[3]], udg_FL_TargetLoc[udg_Index[3]]))
    • Custom script: call SetUnitY(udg_FL_Target[udg_Index[3]], y3[udg_Index[3]])
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (FL_Target[Index[3]] belongs to an enemy of (Owner of FL_Caster[Index[3]])) Equal to (==) true
        • Then - Actions
          • Custom script: local real array dx
          • Custom script: local real array dy
          • Custom script: local real array c
          • Custom script: set dx[udg_Index[3]] = udg_x2[udg_Index[3]] - x3[udg_Index[3]]
          • Custom script: set dy[udg_Index[3]] = udg_y2[udg_Index[3]] - y3[udg_Index[3]]
          • Custom script: set c[udg_Index[3]] = SquareRoot(( Pow(dx[udg_Index[3]], 2.00) + Pow(dy[udg_Index[3]], 2.00) ))
          • Custom script: call UnitDamageTargetBJ( udg_FL_Caster[udg_Index[3]], udg_FL_Target[udg_Index[3]], c[udg_Index[3]], ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
        • Else - Actions
Since I am using a coordinates it takes error after using a spell many times.
What I do not correctly? I define Dx, Dy, calculate offset and caster dealing damage(offset with some koefficients). TC could you help me?
 
well you don't need CosBJ, just use Cos (same with Sin) Also I think you're forgetting to multiply your angle by bj_DEGTORAD at the end, Also store the angle in a variable so that you don't have to find it twice (as with other repeated values)

Additionally: When you're declaring locals you can immediately give them values instead of using a seperate line to set them
 
Level 8
Joined
May 9, 2010
Messages
266
one local variable just to make main var. name shorter to using in custom scripts xD

TC please tell me how use bj_DEGTORAD in my script, because I don`t know :(

Also: with this custom scripts when target is pulling and the range between caster and target >=500, a caster is moving with angle of 90 degrees target is pulling with those angle:(

(went to school :D)
 
  • Custom script: SetUnitX(udg_u, GetUnitX(udg_u) + udg_Speed * Cos(udg_Angle * bj_DEGTORAD)
  • Custom script: SetUnitY(udg_u, GetUnitY(udg_u) + udg_Speed * Sin(udg_Angle * bj_DEGTORAD)
Ofcourse, wherever there's a udg_ you replace it with your variable, but really everything which you're going to use when using co-ordinates should be set into variables already since the same values are going to be used twice (the unit, the speed and the angle)
 
Level 8
Joined
May 9, 2010
Messages
266
Oo it works now, thanks :D
However I have a few questions anymore xD
  • Should I clean local variable and if should how I can do it?
  • What do you think about cutting a lead when unit die? Now it pulling dead units exitwhen timer is not off.

Edit: I have improved the triggers, some cleaned its. In my UMSWE WE it works fine but in normal WE it crashes when trying to save.

In addition I have improved a bug with zLoc, using custom script

  • GetLocationZ(udg_FL_CasterLoc[udg_Index[3]])
 
Last edited:
Top