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!
I developped a GUI system in that allow you to make dragging or grabing abilities with many configurable options.System is made for single target spells. Spell that can be made by the system :
Abduct, Dragging type abilites : the caster abduct it's target and drag it behind him while moving.
Grab, Hanging type abilities : the caster hang itself on the target dealing damage.
Hook, Pull type abilities : The caster pull the target toward it's position.
Grapplin type abilities : The Caster pull itself toward the target.
How to import :
-Copy and paste "Drag or Grab" trigger folder in your map triggers.
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DBSpeedModBool[DBMaxIndex] Equal to True
Then - Actions
Unit - Set DBDraggingUnit[DBMaxIndex] movement speed to ((Default movement speed of DBDraggingUnit[DBMaxIndex]) + DBSpeedMod[DBMaxIndex])
Else - Actions
Unit - Turn collision for DBDraggedUnit[DBMaxIndex] Off
Unit - Add Ghost (Visible) to DBDraggedUnit[DBMaxIndex]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DBLoop <gen> is on) Equal to False
Then - Actions
Trigger - Turn on DBLoop <gen>
Else - Actions
DBLoop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer DBCurrentIndex) from 1 to DBMaxIndex, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(DBDamagedUnit[DBCurrentIndex] is alive) Equal to True
DBDuration[DBCurrentIndex] Greater than 0.00
Then - Actions
Set DBDraggingLoc[DBCurrentIndex] = (Position of DBDraggingUnit[DBCurrentIndex])
Set DBDraggedLoc[DBCurrentIndex] = (Position of DBDraggedUnit[DBCurrentIndex])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DBLeashBool[DBCurrentIndex] Equal to True
Then - Actions
Lightning - Move DBLightning[DBCurrentIndex] to source DBDraggedLoc[DBCurrentIndex] and target DBDraggingLoc[DBCurrentIndex]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DBDisableMove[DBCurrentIndex] Equal to True
Then - Actions
Unit - Order DBDraggedUnit[DBCurrentIndex] to Stop
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between DBDraggedLoc[DBCurrentIndex] and DBDraggingLoc[DBCurrentIndex]) Greater than (DBMaxDistance[DBCurrentIndex] + 15.00)
Then - Actions
Set DBChargeLoc[DBCurrentIndex] = (DBDraggedLoc[DBCurrentIndex] offset by DBChargingSpeed[DBCurrentIndex] towards (Angle from DBDraggedLoc[DBCurrentIndex] to DBDraggingLoc[DBCurrentIndex]) degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between DBDraggedLoc[DBCurrentIndex] and DBDraggingLoc[DBCurrentIndex]) Less than DBMinDistance[DBCurrentIndex]
Then - Actions
Set DBEffectLoc[DBCurrentIndex] = (DBDraggingLoc[DBCurrentIndex] offset by (DBMinDistance[DBCurrentIndex] x -1.00) towards (Angle from DBDraggedLoc[DBCurrentIndex] to DBDraggingLoc[DBCurrentIndex]) degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between DBDraggedLoc[DBCurrentIndex] and DBDraggingLoc[DBCurrentIndex]) Greater than DBMaxDistance[DBCurrentIndex]
Then - Actions
Set DBEffectLoc[DBCurrentIndex] = (DBDraggingLoc[DBCurrentIndex] offset by (DBMaxDistance[DBCurrentIndex] x -1.00) towards (Angle from DBDraggedLoc[DBCurrentIndex] to DBDraggingLoc[DBCurrentIndex]) degrees)
Set DBDuration[DBCurrentIndex] = (DBDuration[DBCurrentIndex] - 0.03)
Unit - Cause DBDamagerUnit[DBCurrentIndex] to damage DBDamagedUnit[DBMaxIndex], dealing (DBDamagePS[DBCurrentIndex] / 33.00) damage of attack type DBAttackType[DBCurrentIndex] and damage type DBDamageType[DBCurrentIndex]
Unit - Set life of DBDamagerUnit[DBCurrentIndex] to ((Life of DBDamagerUnit[DBCurrentIndex]) + (DBHealPS[DBCurrentIndex] / 33.00))
12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.
03:35, 24th Jan 2015
IcemanBo: http://www.hiveworkshop.com/forums/spells-569/mui-drag-grab-v1-0-a-259348/#post2643998
I suggest replacing your GUI move unit with JASS/Custom Script... That way you can add another configurable to pause/stun the unit or not as well it won't be as laggy.
If you add/remove default abilities be aware that units might already have this ability, you are operating with.
Adding in this case is redundant, but won't bring unwanted results. Removing will. So don't remove the ability, if unit already had it before.
All your point variables don't need to be arrays. You always create/remove them.
All variables[maxIndex] should be set again to false, 0, 0.00, etc again onDeindex. Else our system might might hold "old" values for further registration, when the variable[index] won't be re-initialisized again.
onDeindex, also decrement the currentIndex by 1, as you deindex dynamicly. You poetentialy would skip one instance after deindex at the moment.
You potentialy modify the unit's movement speed in "DBInit" trigger. Should not you use "current movement speed" as base, instead of "default movement speed", as it the movement speed can change at game time?
Please add import instructions. Please add a version number, so we can differ the versions.
Hmmm.... I wonder how we can give this variable a custom lightning effect while having the original lightning effects in a same map.
I can only create and use a new lightning effect without changing the original ones by using a series of editing blp, slk, Art - Lightning Effects.
But in this trigger, new added lightning effects do NOT appear on its list, only the original ones. I know with a custom path for an imported custom lightning blp file (e.g. "ReplaceableTextures\Weather\DrainLightning.blp"), I can have that custom lightning effect, but the original lightning effect of the Life Drain ability (DrainLightning.blp) will also be changed while I still wish to use a normal Life Drain of the Dark Ranger Hero. So messy.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.