Jesus4Lyf
Good Idea™
- Reaction score
- 397
Screenshot:
"Sandman" summons an invulnerable sandman which can morph into things (no big custom model, just one for a dummy unit... It is made up of 40 dummy units controlled by Key Timers). It will slide along the ground to the closest enemy ground unit to it's summoner within 500 range, then flick it up into the air, turn into a hammer, and slam it into the ground for a specified amount of damage. This process then repeats for the duration of the spell.
Made with vJASS.
Fully MUI, but due to trigger intensiveness and displaying 40 units at once per instance, I don't recommend multiple instances in general.
Requires Key Timers 2, vJASS, and a simple dummy unit (as per example).
I must warn you, you don't want to see my code... So don't reveal the spoiler below... It could kill you... You've been warned... Don't do it!!
This is my first spell I've submitted to The Helper. I suddenly got the urge to demonstrate the power of Key Timers with it's multi-period functionality and such, along with my JASS knowledge. I got the distinct feeling that people in this community assumed I was a noob at JASS coding or noob at SOMETHING, so I hope this helps dispell that. Hell, I know if I ever saw someone make this I'd be impressed... It took me one full day. No more, no less.
Feel free to use this spell (but please give credit as this was a ton of work), or even write extra addons and actions for Sandman to perform... It shouldn't be too hard if you want to figure out how. The hard bit is the animations.
Who needs custom models when we can just mass little units...?
IMPLEMENTATION
This depends on what you know/what your map has in terms of dummy units.
You need a dummy unit which is:
-A flying unit.
-Invulnerable.
-Locusted.
-Does not attack.
-Has an invisible model that still has an origin attach point (you can rip the model out of my demo map by exporting).
Now I'm assuming you have JASS NewGen.
If you don't have the dummy unit, follow these steps to make it.
1. Open my demo map, go to the place where you import customs, and export dummy.mdx to somewhere.
2. Open the unit editor, go to the bottom, find the dummy unit, and copy it (to clipboard).
3. Open your map.
4. Go to the unit editor, and paste the unit.
5. Go to the place where you import customs, and import dummy.mdx from where you exported it to (and you can delete it now from your computer).
6. Double click on the imported dummy.mdx, click custom path, and set it to "dummy.mdx".
7. Just make sure that the dummy unit's model is indeed set to dummy.mdx or dummy.mdl, whatever displays.
Now that you have the dummy unit...
If you don't have Key Timers 2 in your map, you just need to copy the KT trigger across to get it, though I recommend checking if it's the most recent version.
Once you have Key Timers in your map, simply copy the library above into your map... Perhaps to Custom Script. If you know what you're doing, you can put it anywhere, though.
==Last important bit==
Find the line "set d.part=CreateUnit(Player(15),'u000',x,y,f*bj_RADTODEG)" (it's right near the end, second function from the bottom, in the loop in the most indented part of the code... There's a find function in wc3 anyway) and change 'u000' to the ID of the dummy unit type in your map. This can be found by going to the unit editor, finding the dummy unit, pressing Ctrl+D, remembering the leftmost 4 digit code that shows up (case sensitive!) and then pressing Ctrl+D again, going back to the code and typing it in.
Now you're ready to use it. If you want, copy over my spell from the abilities section of the map, otherwise you can feel free to make your own dummy spell. Mine is nice because it is based off channel.
Now make a trigger:
Event: Unit - Unit starts the effect of an ability.
Condition: Ability Being Cast == <the spell ability>
Action: Custom Script: call Sandman_Create(GetSpellAbilityUnit(), <Duration>, <DamagePerHit>)
Example... Custom Script: call Sandman_Create(GetSpellAbilityUnit(), 17, 100)
That would make it last 17 seconds, and deal 100 damage every time it slams a unit.
You're done! If you run into any problems, feel free to post them here.
Hope you like it!
Edit: Updated it to use new KT2 versions (now 1.3). Why bother? Because it's a -lot- faster! It now multi-instances very nicely, and doesn't lag. Download was at 215 views.
Please note that I found it hard to get a good screenshot of this spell in action...

"Sandman" summons an invulnerable sandman which can morph into things (no big custom model, just one for a dummy unit... It is made up of 40 dummy units controlled by Key Timers). It will slide along the ground to the closest enemy ground unit to it's summoner within 500 range, then flick it up into the air, turn into a hammer, and slam it into the ground for a specified amount of damage. This process then repeats for the duration of the spell.
Made with vJASS.
Fully MUI, but due to trigger intensiveness and displaying 40 units at once per instance, I don't recommend multiple instances in general.
Requires Key Timers 2, vJASS, and a simple dummy unit (as per example).
I must warn you, you don't want to see my code... So don't reveal the spoiler below... It could kill you... You've been warned... Don't do it!!
You're brave, I'll give you that.
Did you learn your lesson?
JASS:
library Sandman initializer InitSandman uses KT
// Easy to use library. Just call Sandman_Create(summoner, duration, damage per hit)
// Spell made by Jesus4Lyf. Please give credit if you use any part of it...
// As you can see, it was a lot of work.
// This spell demonstrates the power of Key Timers 2.
// Note: While this spell is fully MUI, it is very intensive, and shouldn't be spammed.
globals
private constant string SMmodel="units\\creeps\\GrizzlyBear\\GrizzlyBear.mdl"
private constant real SMscale=0.09
private integer NewOrderSubject
private trigger NewOrderTrig=CreateTrigger()
private real array Height
endglobals
private struct sandman
real timeleft
unit caster
unit target
real x
real y
real f
real speed
effect e
unit eu
unit array part[41]
effect array parte[41]
real array partdestx[41]
real array partdesty[41]
real array partdestz[41]
real dmg
integer tick=0
endstruct
private function NewOrder takes sandman d returns nothing
set NewOrderSubject=d
call TriggerEvaluate(NewOrderTrig)
endfunction
private function Finish takes nothing returns boolean
local sandman d=GetTriggerExecCount(GetTriggeringTrigger())
local integer i=40
if d.tick==0 then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\UDeathMedium\\UDeath.mdl",d.x,d.y))
endif
set d.tick=d.tick+1
if d.tick<41 then
set i=d.tick
endif
loop
call SetUnitFlyHeight(d.part<i>,GetUnitFlyHeight(d.part<i>)+(d.tick-i)*2.,0)
set i=i-1
exitwhen i==0
endloop
if d.tick==120 then
set i=0
loop
set i=i+1
call DestroyEffect(d.parte<i>)
set d.parte<i>=null
call KillUnit(d.part<i>)
call RemoveUnit(d.part<i>)
set d.part<i>=null
exitwhen i==40
endloop
set d.target=null
set d.caster=null
call d.destroy()
return true
endif
return false
endfunction
//! textmacro BirthPartDestSet takes ID, X, Y
set d.partdestx[$ID$]=x+cosf*$Y$-sinf*$X$
set d.partdesty[$ID$]=y+sinf*$Y$+cosf*$X$
set d.partdestz[$ID$]=z
//! endtextmacro
private function InitBirth takes sandman d returns nothing
local real cosf=Cos(d.f)
local real sinf=Sin(d.f)
local real x=d.x
local real y=d.y
local real z=0
//! runtextmacro BirthPartDestSet("1","20","5")
//! runtextmacro BirthPartDestSet("2","-20","5")
set z=z+10
//! runtextmacro BirthPartDestSet("3","20","0")
//! runtextmacro BirthPartDestSet("4","-20","0")
set z=z+10
//! runtextmacro BirthPartDestSet("5","16.5","2")
//! runtextmacro BirthPartDestSet("6","-16.5","2")
set z=z+10
//! runtextmacro BirthPartDestSet("7","15","4")
//! runtextmacro BirthPartDestSet("8","-15","4")
set z=z+10
//! runtextmacro BirthPartDestSet("9","11","2.5")
//! runtextmacro BirthPartDestSet("10","-11","2.5")
set z=z+10
//! runtextmacro BirthPartDestSet("11","7","1")
//! runtextmacro BirthPartDestSet("12","-7","1")
set z=z+10
//! runtextmacro BirthPartDestSet("13","3","0")
//! runtextmacro BirthPartDestSet("14","-3","0")
set z=z+10
//! runtextmacro BirthPartDestSet("15","3","0")
//! runtextmacro BirthPartDestSet("16","-3","0")
set z=z+10
//! runtextmacro BirthPartDestSet("17","3","0")
//! runtextmacro BirthPartDestSet("18","-3","0")
set z=z+10
//! runtextmacro BirthPartDestSet("19","3","0")
//! runtextmacro BirthPartDestSet("20","-3","0")
set z=z+10
//! runtextmacro BirthPartDestSet("21","-24","18")
//! runtextmacro BirthPartDestSet("22","-20","12")
//! runtextmacro BirthPartDestSet("23","-16","6")
//! runtextmacro BirthPartDestSet("24","-12","0")
//! runtextmacro BirthPartDestSet("25","-8","0")
//! runtextmacro BirthPartDestSet("26","-4","0")
//! runtextmacro BirthPartDestSet("27","0","0")
//! runtextmacro BirthPartDestSet("28","4","0")
//! runtextmacro BirthPartDestSet("29","8","0")
//! runtextmacro BirthPartDestSet("30","12","0")
//! runtextmacro BirthPartDestSet("31","16","6")
//! runtextmacro BirthPartDestSet("32","20","12")
//! runtextmacro BirthPartDestSet("33","24","18")
set z=z+10
//! runtextmacro BirthPartDestSet("34","0","0")
set z=z+10
//! runtextmacro BirthPartDestSet("35","7","0")
//! runtextmacro BirthPartDestSet("36","0","7")
//! runtextmacro BirthPartDestSet("37","-7","0")
//! runtextmacro BirthPartDestSet("38","0","7")
//! runtextmacro BirthPartDestSet("39","0","0")
set z=z+10
//! runtextmacro BirthPartDestSet("40","0","0")
endfunction
private function Birth takes nothing returns boolean
local sandman d=GetTriggerExecCount(GetTriggeringTrigger())
local integer i=0
if d.tick==0 then
call InitBirth(d)
endif
set d.tick=d.tick+1
loop
set i=i+1
call SetUnitX(d.part<i>,GetUnitX(d.part<i>)+(d.partdestx<i>-GetUnitX(d.part<i>))*0.2)
call SetUnitY(d.part<i>,GetUnitY(d.part<i>)+(d.partdesty<i>-GetUnitY(d.part<i>))*0.2)
call SetUnitFlyHeight(d.part<i>,GetUnitFlyHeight(d.part<i>)+(d.partdestz<i>-GetUnitFlyHeight(d.part<i>))*0.1,0)
exitwhen i==40
endloop
if d.tick==50 then
set d.tick=0
call NewOrder(d)
return true
endif
return false
endfunction
private function InitHit takes sandman d returns nothing
local real cosf=Cos(d.f)
local real sinf=Sin(d.f)
local integer i=0
set d.x=GetUnitX(d.target)
set d.y=GetUnitY(d.target)
set d.speed=90*bj_DEGTORAD
// x = modfacing. y = modvert. z = distance.
loop
set i=i+1
set d.partdestx<i>=-1.*bj_DEGTORAD
set d.partdesty<i>=0
set d.partdestz<i>=i*8+20
exitwhen i==10
endloop
loop
set i=i+1
set d.partdestx<i>=1.*bj_DEGTORAD
set d.partdesty<i>=0
set d.partdestz<i>=(i-10)*8+20
exitwhen i==20
endloop
loop
set i=i+1
set d.partdestx<i>=1.*bj_DEGTORAD
set d.partdesty<i>=((i-23)*7.)*bj_DEGTORAD
set d.partdestz<i>=105
exitwhen i==25
endloop
loop
set i=i+1
set d.partdestx<i>=-1.*bj_DEGTORAD
set d.partdesty<i>=((i-28)*7.)*bj_DEGTORAD
set d.partdestz<i>=105
exitwhen i==30
endloop
loop
set i=i+1
set d.partdestx<i>=1.*bj_DEGTORAD
set d.partdesty<i>=((i-33)*7.)*bj_DEGTORAD
set d.partdestz<i>=115
exitwhen i==35
endloop
loop
set i=i+1
set d.partdestx<i>=-1.*bj_DEGTORAD
set d.partdesty<i>=((i-38)*7.)*bj_DEGTORAD
set d.partdestz<i>=115
exitwhen i==40
endloop
endfunction
private function Hit takes nothing returns boolean
local sandman d=GetTriggerExecCount(GetTriggeringTrigger())
local integer i=0
local real r
if d.tick==0 then
call InitHit(d)
endif
set d.tick=d.tick+1
if d.tick<42 then
call SetUnitFlyHeight(d.target,Height[d.tick],0)
// x = modfacing. y = modvert. z = distance. speed = modvert.
set d.speed=d.speed+bj_DEGTORAD
loop
set i=i+1
set r=Cos(d.partdesty<i>+d.speed)
call SetUnitX(d.part<i>,GetUnitX(d.part<i>)+(d.partdestz<i>*Cos(d.f+d.partdestx<i>)*r-GetUnitX(d.part<i>)+d.x)*0.1)
call SetUnitY(d.part<i>,GetUnitY(d.part<i>)+(d.partdestz<i>*Sin(d.f+d.partdestx<i>)*r-GetUnitY(d.part<i>)+d.y)*0.1)
call SetUnitFlyHeight(d.part<i>,GetUnitFlyHeight(d.part<i>)+(d.partdestz<i>*Sin(d.partdesty<i>+d.speed)-GetUnitFlyHeight(d.part<i>))*0.1,0)
exitwhen i==40
endloop
elseif d.tick<52 then
set d.speed=d.speed-13.*bj_DEGTORAD
loop
set i=i+1
set r=Cos(d.partdesty<i>+d.speed)
call SetUnitX(d.part<i>,d.partdestz<i>*Cos(d.f+d.partdestx<i>)*r+d.x)
call SetUnitY(d.part<i>,d.partdestz<i>*Sin(d.f+d.partdestx<i>)*r+d.y)
call SetUnitFlyHeight(d.part<i>,d.partdestz<i>*Sin(d.partdesty<i>+d.speed),0)
exitwhen i==40
endloop
set r=Cos(d.speed-10.*bj_DEGTORAD)
call SetUnitX(d.target,80.*Cos(d.f)*r+d.x)
call SetUnitY(d.target,80.*Sin(d.f)*r+d.y)
call SetUnitFlyHeight(d.target,80*Sin(d.speed-10.*bj_DEGTORAD),0)
if d.tick==41 then
// This bit doesn't seem to work. Can't figure it out. =/
call SetUnitTimeScale(d.target,5.)
call SetUnitAnimation(d.target,"death")
endif
if d.tick==42 then
call SetUnitTimeScale(d.target,1.)
call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl",d.target,"head"))
endif
elseif d.tick==52 then
call UnitDamageTarget(d.caster,d.target,d.dmg,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl",GetUnitX(d.target),GetUnitY(d.target)))
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(d.target),GetUnitY(d.target)))
// Alternative to the line above: call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(d.target),GetUnitY(d.target)))
call SetUnitFlyHeight(d.target,0,0)
elseif d.tick==100 then
call PauseUnit(d.target,false)
if GetWidgetLife(d.target)>=0.405 then
call SetUnitAnimation(d.target,"stand")
endif
set d.target=null
set d.tick=0
if d.timeleft<0 then
call KT_Add(function Finish,d,0.03)
else
call KT_Add(function Birth,d,0.02)
endif
return true
endif
return false
endfunction
private function Attack takes nothing returns boolean
local sandman d=GetTriggerExecCount(GetTriggeringTrigger())
local real x
local real y
local integer i=0
set d.tick=d.tick+1
if d.tick<50 then
loop
set i=i+1
call SetUnitX(d.part<i>,GetUnitX(d.part<i>)+(d.x-GetUnitX(d.part<i>))*0.1)
call SetUnitY(d.part<i>,GetUnitY(d.part<i>)+(d.y-GetUnitY(d.part<i>))*0.1)
call SetUnitFlyHeight(d.part<i>,GetUnitFlyHeight(d.part<i>)*0.9,0)
exitwhen i==40
endloop
elseif d.tick==50 then
loop
set i=i+1
call SetUnitX(d.part<i>,d.x)
call SetUnitY(d.part<i>,d.y)
call SetUnitFlyHeight(d.part<i>,0,0)
call SetUnitFacing(d.part<i>,GetRandomReal(0,360))
exitwhen i==40
endloop
set d.speed=0
set d.eu=CreateUnit(Player(15),'u000',d.x,d.y,Atan2(GetUnitY(d.target)-d.y,GetUnitX(d.target)-d.x)*bj_RADTODEG)
set d.e=AddSpecialEffectTarget("Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl",d.eu,"origin")
else
loop
set i=i+1
exitwhen i==40
call SetUnitX(d.part<i>,GetUnitX(d.part[i+1]))
call SetUnitY(d.part<i>,GetUnitY(d.part[i+1]))
call SetUnitFlyHeight(d.part<i>,0,0)
endloop
set x=GetUnitX(d.target)-GetUnitX(d.part<i>)
set y=GetUnitY(d.target)-GetUnitY(d.part<i>)
set x=SquareRoot(x*x+y*y)
set d.speed=d.speed+0.1
if x<d.speed*2 then
call SetUnitX(d.part<i>,GetUnitX(d.target))
call SetUnitY(d.part<i>,GetUnitY(d.target))
call DestroyEffect(d.e)
set d.e=null
call KillUnit(d.eu)
call RemoveUnit(d.eu)
set d.eu=null
set d.tick=0
set d.x=GetUnitX(d.target)
set d.y=GetUnitY(d.target)
if d.timeleft<0 then
call KT_Add(function Finish,d,0.03)
else
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl",GetUnitX(d.target),GetUnitY(d.target)))
call PauseUnit(d.target,true)
call UnitAddAbility(d.target,'Amrf')
call UnitRemoveAbility(d.target,'Amrf')
set d.f=Atan2(GetUnitY(d.target)-GetUnitY(d.caster),GetUnitX(d.target)-GetUnitX(d.caster))
call KT_Add(function Hit,d,0.02)
endif
return true
endif
set x=d.speed/x
set y=GetUnitY(d.part<i>)+y*x
set x=GetUnitX(d.part<i>)+(GetUnitX(d.target)-GetUnitX(d.part<i>))*x
call SetUnitX(d.part<i>,x)
call SetUnitY(d.part<i>,y)
call SetUnitX(d.eu,x)
call SetUnitY(d.eu,y)
endif
return false
endfunction
private function Idle takes nothing returns boolean
call NewOrder(GetTriggerExecCount(GetTriggeringTrigger()))
return true
endfunction
private function DoNewOrder takes nothing returns boolean
local sandman d=NewOrderSubject
local real x=GetUnitX(d.caster)
local real y=GetUnitY(d.caster)
local player p=GetOwningPlayer(d.caster)
local group g=CreateGroup()
local real dd=500*500
local real dx
local real dy
local unit u
local unit t=null
if d.timeleft<0 then
call DestroyGroup(g)
set g=null
call KT_Add(function Finish,d,0.03)
return true
endif
call GroupEnumUnitsInRange(g,x,y,500,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
if IsUnitEnemy(u,p) and GetWidgetLife(u)>0.405 and IsUnitType(u,UNIT_TYPE_GROUND)==true!=IsUnitType(u,UNIT_TYPE_STRUCTURE) then
set dx=GetUnitX(u)-x
set dy=GetUnitY(u)-y
set dx=dx*dx+dy*dy
if dx<dd then
set dd=dx
set t=u
endif
endif
endloop
call DestroyGroup(g)
set g=null
if t==null then
call KT_Add(function Idle,d,1.0)
return false
endif
set d.target=t
call KT_Add(function Attack,d,0.01)
return false
endfunction
private function CountDown takes nothing returns boolean
local sandman d=GetTriggerExecCount(GetTriggeringTrigger())
set d.timeleft=d.timeleft-0.1
return d.timeleft<0
endfunction
public function Create takes unit caster, real duration, real damage returns nothing
local integer i=0
local real f=GetUnitFacing(caster)*bj_DEGTORAD
local real x=GetUnitX(caster)+Cos(f)*50
local real y=GetUnitY(caster)+Sin(f)*50
local sandman d=sandman.create()
set d.caster=caster
set d.timeleft=duration
set d.dmg=damage
set d.x=x
set d.y=y
set d.f=f
loop
set i=i+1
set d.part<i>=CreateUnit(Player(15),'u000',x,y,f*bj_RADTODEG)
set d.parte<i>=AddSpecialEffectTarget(SMmodel,d.part<i>,"origin")
call SetUnitScale(d.part<i>,SMscale,SMscale,SMscale)
exitwhen i==40
endloop
call KT_Add(function CountDown,d,0.1)
call KT_Add(function Birth,d,0.02)
endfunction
private function InitSandman takes nothing returns nothing
local integer i=0
local real h=0
call TriggerAddCondition(NewOrderTrig,Condition(function DoNewOrder))
loop
set i=i+1
set h=h-5*(I2R(i-22)*.25+Pow(I2R(i-22)/-100.,3.))
set Height<i>=h
exitwhen i==44
endloop
endfunction
endlibrary</i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i></i>
Did you learn your lesson?
This is my first spell I've submitted to The Helper. I suddenly got the urge to demonstrate the power of Key Timers with it's multi-period functionality and such, along with my JASS knowledge. I got the distinct feeling that people in this community assumed I was a noob at JASS coding or noob at SOMETHING, so I hope this helps dispell that. Hell, I know if I ever saw someone make this I'd be impressed... It took me one full day. No more, no less.
Feel free to use this spell (but please give credit as this was a ton of work), or even write extra addons and actions for Sandman to perform... It shouldn't be too hard if you want to figure out how. The hard bit is the animations.
Who needs custom models when we can just mass little units...?
IMPLEMENTATION
This depends on what you know/what your map has in terms of dummy units.
You need a dummy unit which is:
-A flying unit.
-Invulnerable.
-Locusted.
-Does not attack.
-Has an invisible model that still has an origin attach point (you can rip the model out of my demo map by exporting).
Now I'm assuming you have JASS NewGen.
If you don't have the dummy unit, follow these steps to make it.
1. Open my demo map, go to the place where you import customs, and export dummy.mdx to somewhere.
2. Open the unit editor, go to the bottom, find the dummy unit, and copy it (to clipboard).
3. Open your map.
4. Go to the unit editor, and paste the unit.
5. Go to the place where you import customs, and import dummy.mdx from where you exported it to (and you can delete it now from your computer).
6. Double click on the imported dummy.mdx, click custom path, and set it to "dummy.mdx".
7. Just make sure that the dummy unit's model is indeed set to dummy.mdx or dummy.mdl, whatever displays.
Now that you have the dummy unit...
If you don't have Key Timers 2 in your map, you just need to copy the KT trigger across to get it, though I recommend checking if it's the most recent version.
Once you have Key Timers in your map, simply copy the library above into your map... Perhaps to Custom Script. If you know what you're doing, you can put it anywhere, though.
==Last important bit==
Find the line "set d.part=CreateUnit(Player(15),'u000',x,y,f*bj_RADTODEG)" (it's right near the end, second function from the bottom, in the loop in the most indented part of the code... There's a find function in wc3 anyway) and change 'u000' to the ID of the dummy unit type in your map. This can be found by going to the unit editor, finding the dummy unit, pressing Ctrl+D, remembering the leftmost 4 digit code that shows up (case sensitive!) and then pressing Ctrl+D again, going back to the code and typing it in.
Now you're ready to use it. If you want, copy over my spell from the abilities section of the map, otherwise you can feel free to make your own dummy spell. Mine is nice because it is based off channel.
Now make a trigger:
Event: Unit - Unit starts the effect of an ability.
Condition: Ability Being Cast == <the spell ability>
Action: Custom Script: call Sandman_Create(GetSpellAbilityUnit(), <Duration>, <DamagePerHit>)
Example... Custom Script: call Sandman_Create(GetSpellAbilityUnit(), 17, 100)
That would make it last 17 seconds, and deal 100 damage every time it slams a unit.
You're done! If you run into any problems, feel free to post them here.
Hope you like it!
Edit: Updated it to use new KT2 versions (now 1.3). Why bother? Because it's a -lot- faster! It now multi-instances very nicely, and doesn't lag. Download was at 215 views.
Attachments
-
30.3 KB Views: 991