Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Why don't you want to use the base impale ability?
What other requirements does your spell have?
You could time the damage to only happen on landing ( (distance/speed) + 1 ) sec
Untitled Trigger 001

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Impale

Actions


Custom script: local unit u = GetTriggerUnit()


Custom script: local unit u2 = GetSpellTargetUnit()


Wait 5.00 seconds


Unit - Cause u to damage u2, dealing 500.00 damage of attack type Spells and damage type Normal


Custom script: set u = null


Custom script: set u2 = null
the other side effect of impale is that if you move it will stop going, it is channeling, thats why dota's impale is Channel-based spell
he means
the u and u2 are globals but if you have global with name u and you do local unit u and you want to do like i did cause u to damage u2 it will first check if there are locals with name u and u2 then globals(I think thats how it works, if not then sorry
Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Impale
Actions
Custom script: local unit u = GetTriggerUnit()
Custom script: local unit u2 = GetSpellTargetUnit()
Wait 5.00 seconds
Unit - Cause u to damage u2, dealing 500.00 damage of attack type Spells and damage type Normal
Custom script: set u = null
Custom script: set u2 = null
but it works)
do you want it in GUI or Jass?
this damages noone acuallybecause target of ability being cast is noone with spell targeting point
You'd have to add units in a rectangle angled from the caster to the target point, and damage each unit in it individually.
can anyone help me to make an impale ability with full gui (not using the base impale ability)
thanks before
it's hard to make it have a custom trigger damage
because of it's air time makes the targets invulnerable
Example

Events


Unit - a unit start the effect of an ability

Conditions


Ability being cast equal to (Ability)

Actions


Set Distance = 0.00


Set TempPoint = Position of (Triggering unit)


Set TempPoint2 = Target point of ability being cast


Set Angle = Angle Between points (TempPoint) and (TempPoint2)


Set Range = Distance between points (TempPoint) and (TempPoint2)


Set loopMax = (Integer(Range/Aoe))


For each (loopIndex) from 1 to loopMax do (actions)



Loop - Actions




Set Distance = Distance + Aoe




Set TempPoint3 = offset from TempPoint by (Distance) towards (Angle) degrees




Set TempGroup = (units within (Aoe) of (TempPoint3))




Unit - Pick all units within (TempGroup) and do (Actions)





Loop - Actions






Set TempUnit = (Picked unit)






If (Multiple conditions) then (Multiple actions) else (Actions)







Conditions








(TempUnit) is in (TargetGroup) = False








>>Other conditions (flyers, enemy etc.)<<








>>Alternatively, scan an index above this if block for the existance of the unit in the index and don't run this if it turns out it is, although this can still be done in the way mentioned above if you then flush the (TargetGroup) unit group at the bottom<<







Then - Actions








Unit - Add unit to (TargetGroup)








>>Alternatively, Indexing occurs<< depends on if using a hashtable or dynamic indexing method<<








>>Effects as well, Of course<<







Else - Actions




Custom script: call RemoveLocation(udg_TempPoint3)




Custom script: call DestroyGroup(udg_TempGroup)


Custom script: call RemoveLocation(udg_TempPoint)


Custom script: call RemoveLocation(udg_TempPoint2)
Set loopMax = (Integer(Range/Aoe))
For each (loopIndex) from 1 to loopMax do (actions)
Loop - Actions
Set Distance = Distance + Aoe
Set TempPoint3 = offset from TempPoint by (Distance) towards (Angle) degrees
Set TempGroup = (units within (Aoe) of (TempPoint3))
Unit - Pick all units within (TempGroup) and do (Actions)
Loop - Actions
Set TempUnit = (Picked unit)
If (Multiple conditions) then (Multiple actions) else (Actions)
Conditions
(TempUnit) is in (TargetGroup) = False
>>Other conditions (flyers, enemy etc.)<<
>>Alternatively, scan an index above this if block for the existance of the unit in the index and don't run this if it turns out it is, although this can still be done in the way mentioned above if you then flush the (TargetGroup) unit group at the bottom<<
Then - Actions
Unit - Add unit to (TargetGroup)
>>Alternatively, Indexing occurs<< depends on if using a hashtable or dynamic indexing method<<
>>Effects as well, Of course<<
Else - Actions
Example

Events


Unit - a unit start the effect of an ability

Conditions


Ability being cast equal to (Ability)

Actions


Set Distance = 0.00


Set TempPoint = Position of (Triggering unit)


Set TempPoint2 = Target point of ability being cast


Set Angle = Angle Between points (TempPoint) and (TempPoint2)


Set Range = Distance between points (TempPoint) and (TempPoint2)
Set loopMax = (Integer(Range/Aoe))
For each (loopIndex) from 1 to loopMax do (actions)

Loop - Actions
Set Distance = Distance + Aoe
Set TempPoint3 = offset from TempPoint by (Distance) towards (Angle) degrees
Set TempGroup = (units within (Aoe) of (TempPoint3))
Unit - Pick all units within (TempGroup) and do (Actions)

Loop - Actions


Set TempUnit = (Picked unit)


If (Multiple conditions) then (Multiple actions) else (Actions)



Conditions




(TempUnit) is in (TargetGroup) = False




>>Other conditions (flyers, enemy etc.)<<




>>Alternatively, scan an index above this if block for the existance of the unit in the index and don't run this if it turns out it is, although this can still be done in the way mentioned above if you then flush the (TargetGroup) unit group at the bottom<<



Then - Actions




Unit - Add unit to (TargetGroup)




>>Alternatively, Indexing occurs<< depends on if using a hashtable or dynamic indexing method<<




>>Effects as well, Of course<<



Else - Actions
Custom script: call RemoveLocation(udg_TempPoint3)
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_TempPoint2)
Unit - Make (Picked unit) Vulnerable
I'll explain the individual parts:
This bit you make sense of, so not much point talking about that
Example
Events
Unit - a unit start the effect of an ability
Conditions
Ability being cast equal to (Ability)
Actions
Set Distance = 0.00
Set TempPoint = Position of (Triggering unit)
Set TempPoint2 = Target point of ability being cast
Set Angle = Angle Between points (TempPoint) and (TempPoint2)
Set Range = Distance between points (TempPoint) and (TempPoint2)
This part is to work out how many times we need to run the index to grab all the units within a line of the given range (Range) being how far to go, (Aoe) being how much distance we cover part index
Set loopMax = (Integer(Range/Aoe))
For each (loopIndex) from 1 to loopMax do (actions)
Loop - Actions
Distance is increased to move along the "line" by the Aoe range, TempPoint3 is to get the new location of the distance we need so we can then use it to grab nearby units with the unit group
Set Distance = Distance + Aoe
Set TempPoint3 = offset from TempPoint by (Distance) towards (Angle) degrees
Set TempGroup = (units within (Aoe) of (TempPoint3))
All of this is to just add eligble units into the spell for the impale to effect by running tests on the unit, and the rest is removing leaks
Unit - Pick all units within (TempGroup) and do (Actions)
Loop - Actions
Set TempUnit = (Picked unit)
If (Multiple conditions) then (Multiple actions) else (Actions)
Conditions
(TempUnit) is in (TargetGroup) = False
>>Other conditions (flyers, enemy etc.)<<
>>Alternatively, scan an index above this if block for the existance of the unit in the index and don't run this if it turns out it is, although this can still be done in the way mentioned above if you then flush the (TargetGroup) unit group at the bottom<<
Then - Actions
Unit - Add unit to (TargetGroup)
>>Alternatively, Indexing occurs<< depends on if using a hashtable or dynamic indexing method<<
>>Effects as well, Of course<<
Else - Actions
Custom script: call RemoveLocation(udg_TempPoint3)
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call RemoveLocation(udg_TempPoint2)
Set loopMax = (Integer(Range/Aoe))
Set LoopMax = (Integer(Range/SearchDistance))
