GetTriggerUnit-
DogEntrepreneur
- Reaction score
- 129
Still cant.
I suppose the map requires v1.23b, right?
you should put that in the "Requirements"
library EAE requires TT
//A library designed for Burning Hell, By Komaqtion
//by kingking
//How to use?
//>> For delayed effect, use :
//function EAE_Effect takes effect e, real duration
//>>For delayed callback, use :
//function EAE_Calllback takes code c, real duration, integer structz
//In order to access the data, Use EAE_GetData() to get the struct index in the callback function.
globals
private integer ReturnIndex
endglobals
///////////////////////////////Effect Section////////////////////////////////////////////////
private struct EffectData
effect e
method onDestroy takes nothing returns nothing
call DestroyEffect(.e)
endmethod
endstruct
private function DesEffect takes nothing returns boolean
local EffectData d = TT_GetData()
call d.destroy()
return true
endfunction
public function Effect takes effect e, real duration returns nothing
local EffectData d = EffectData.create()
set d.e = e
call TT_Once(function DesEffect, 0, duration)
endfunction
/////////////////////////////////////////////////////////////////////////////////////////////
private struct DelayedCallback
integer data
trigger callback = CreateTrigger()
triggeraction ta
endstruct
private function Destroy takes nothing returns boolean
local DelayedCallback d = TT_GetData()
set ReturnIndex = d.data
call TriggerExecute(d.callback)
call TriggerRemoveAction(d.callback, d.ta)
call d.destroy()
return true
endfunction
public function GetData takes nothing returns integer
return ReturnIndex
endfunction
public function Callback takes code callback, real duration, integer data returns nothing
local DelayedCallback d = DelayedCallback.create()
set d.data = data
set d.ta = TriggerAddAction(d.callback, callback)
call TT_Once(function Destroy, d, duration)
endfunction
endlibrary
scope Dummy initializer init
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//***********************************************************************************************************//
//@@////////////////////////////////////Burning Hell, Made By Komaqtion////////////////////////////////////@@//
//@@ @@//
//@@ How to import: @@//
//@@ @@//
//@@ ¤ First copy the ability "Burning Hell" and the unit "Dummy" and change the ID's in the @@//
//@@ constants below to the new ones. Then you need to import Vexorian's dummy.mdx file from @@//
//@@ this map, or another, and change "Dummy" unit's model to this one. Then, of course, you @@//
//@@ need to import the triggers, which are in the categories "The Spell" and @@//
//@@ "Required Systems". Then you're free to change any of the given global constants to suit @@//
//@@ your needs. @@//
//@@ @@//
//@@ Requirements: @@//
//@@ ¤ This spell, of course ! @@//
//@@ ¤ Timer Ticker, made by Cohadar <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> @@//
//@@ ¤ The library made especially for this spell, EAE, made by kingkingyyk3!!! @@//
//@@ ¤ The dummy.mdx, made by Vexorian ! @@//
//@@ @@//
//@@ ¤ Credits to: @@//
//@@ * Vexorian, for the dummy.mdx file @@//
//@@ * Cohadar for TT (Timer Ticker) @@//
//@@ * Jesus4Lyf, for KeyTimers 2 (Even if this spell doesn't use it anymore XD) @@//
//@@ * TriggerHappy187, for TimedHandles (Even if this spell doesn't use it anymore XD) @@//
//@@ * Kingkingyyk3, for his wonderfull help on this spell, and for making EAE ! @@//
//@@ @@//
//@@ And, of course, so many thanks to all of the many helpfull people at TheHelper.net @@//
//@@ who has helped get is spell working! (kingkingyyk3 and WolfieNoCT especially <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />) @@//
//@@ @@//
//@@ @@//
//@@ Note: This is my very first fully working, and quite good, spell made completely in vJASS. @@//
//@@ vJASS. @@//
//@@ So much feedback, and suggestions are very much welcome, and maybe some tips to make it @@//
//@@ even better would be nice <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> @@//
//@@ @@//
//@@///////////////////////////////////////////////////////////////////////////////////////////////////////@@//
//***********************************************************************************************************//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
globals
// Effects! Change as you'd like <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />\\
private constant string EFFECT_C = "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" // Effect on the caster!
private constant string EFFECT_1 = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl" // Effect 200 range from the caster!
private constant string EFFECT_2 = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" // Effect at the end!
private constant string DUMMY_EFFECT = "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" // Effect on the moving dummy!
// ID's! Change to the ID's on your map <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />\\
private constant integer SPELL_ID = 039;0000039; // ID of the spell!
private constant integer DUMMY_ID = 039;h000039; // ID of the dummy unit!
private constant integer LOCUST = 039;Aloc039; // ID of the "Locust" ability! (Might not need changing)
private constant integer BUFF_ID = 039;BTLF039; // ID of the expiration buff on the dummy!
// Other constant integers! Change at will <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />\\
private constant real DAMAGE_FACTOR = 1.
private constant real RANGE_FACTOR = 15.
private constant integer ANGLES = 16 // The number of agles the effects will show at! (360/ANGLES)
private constant attacktype ATTACK_TYPE = ATTACK_TYPE_NORMAL // Explains itself i think XD
private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_NORMAL // Same here <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />
private constant real SLIDE_SPEED = 10 // How much the dummy effect moves each 0.05 seconds!
endglobals
globals
// Globals! Simply DON'T CHANGE!\\
private integer TempStructIndex
private group Temp = CreateGroup()
endglobals
private struct Data
unit array du [ANGLES]
unit cs
real array pointx [ANGLES]
real array pointy [ANGLES]
boolean b
player p
group g
integer lvl
static method create takes unit u returns Data
local Data a = Data.allocate()
set a.cs = u
set a.b = false
set a.p = GetOwningPlayer(u)
set a.g = CreateGroup()
set a.lvl = GetUnitAbilityLevel(a.cs,SPELL_ID)
return a
endmethod
endstruct
// Some more configurables that needed the struct!\\
// Damage functions!\\
private function Damage_Small takes nothing returns real
return DAMAGE_FACTOR * 10
endfunction
private function Damage_Medium takes integer lv returns real
return 50 + lv * DAMAGE_FACTOR * 50
endfunction
private function Damage_High takes integer lv returns real
return lv * DAMAGE_FACTOR * 100
endfunction
// Range functions!\\
private function Range_Small takes nothing returns real
return RANGE_FACTOR * 5
endfunction
private function Range_Medium takes nothing returns real
return RANGE_FACTOR * 10
endfunction
private function Range_High takes nothing returns real
return RANGE_FACTOR * RANGE_FACTOR
endfunction
// End of Configuration!\\
private function Spell_Check takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function GroupEm takes nothing returns boolean
local Data a = TempStructIndex
return GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitEnemy(GetFilterUnit(), a.p) and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false and IsUnitInGroup(GetFilterUnit(),a.g) == false
endfunction
private function Smaller_GroupEm takes nothing returns boolean
local Data a = TempStructIndex
return GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitEnemy(GetFilterUnit(), a.p) and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false
endfunction
private function Callback takes nothing returns nothing
local Data a = EAE_GetData()
local integer i = 1
local unit temp
loop
exitwhen i >=ANGLES
set a.pointx<i> = GetUnitX(a.du<i>)
set a.pointy<i> = GetUnitY(a.du<i>)
call DestroyEffect(AddSpecialEffect(EFFECT_2,a.pointx<i>,a.pointy<i>))
call GroupEnumUnitsInRange(Temp, a.pointx<i>, a.pointy<i>, Range_High(), Condition(function Smaller_GroupEm))
loop
set temp = FirstOfGroup(Temp)
exitwhen temp == null
call UnitDamageTarget(a.cs, temp, Damage_High(a.lvl), true, false, ATTACK_TYPE, DAMAGE_TYPE, null)
call GroupRemoveUnit(Temp,temp)
endloop
call RemoveUnit(a.du<i>)
set i = i+1
endloop
endfunction
private function Move_Dummy takes nothing returns boolean
local Data a = TT_GetData()
local real xd
local real yd
local integer i = 1
local unit temp
loop
exitwhen i>=ANGLES
set xd = GetUnitX(a.du<i>)
set yd = GetUnitY(a.du<i>)
set a.pointx<i> = xd+SLIDE_SPEED*Cos(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set a.pointy<i> = yd+SLIDE_SPEED*Sin(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set TempStructIndex = a
call GroupEnumUnitsInRange(Temp, a.pointx<i>, a.pointy<i>, Range_Small(), Condition(function Smaller_GroupEm))
loop
set temp = FirstOfGroup(Temp)
exitwhen temp == null
call UnitDamageTarget(a.cs, temp, Damage_Small(), true, false, ATTACK_TYPE, DAMAGE_TYPE, null)
call GroupAddUnit(a.g,temp)
call GroupRemoveUnit(Temp,temp)
endloop
call SetUnitX(a.du<i>,a.pointx<i>)
call SetUnitY(a.du<i>,a.pointy<i>)
set i = i+1
endloop
return a.b
endfunction
private function Effects takes nothing returns nothing
local Data a = Data.create(GetTriggerUnit())
local real xu = GetUnitX(a.cs)
local real yu = GetUnitY(a.cs)
local integer i = 1
local unit temp
call DestroyEffect(AddSpecialEffect(EFFECT_C,xu,yu))
loop
exitwhen i>=ANGLES
set a.pointx<i> = xu+200*Cos(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set a.pointy<i> = yu+200*Sin(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set TempStructIndex = a
call DestroyEffect(AddSpecialEffect(EFFECT_1, a.pointx<i>, a.pointy<i>))
call GroupEnumUnitsInRange(Temp, a.pointx<i>, a.pointy<i>,Range_Medium(), Condition(function GroupEm))
loop
set temp = FirstOfGroup(Temp)
exitwhen temp == null
call UnitDamageTarget(a.cs, temp, Damage_Medium(a.lvl), true, false, ATTACK_TYPE, DAMAGE_TYPE, null)
call GroupAddUnit(a.g,temp)
call GroupRemoveUnit(Temp,temp)
endloop
set a.du<i> = CreateUnit(a.p,DUMMY_ID,xu,yu,bj_RADTODEG*Atan2(a.pointy<i>-yu,a.pointx<i>-xu))
call UnitAddAbility(a.du<i>,LOCUST)
call EAE_Effect(AddSpecialEffectTarget(DUMMY_EFFECT,a.du<i>,"origin"),2.5)
set i = i+1
endloop
call EAE_Callback(function Callback, 2.5, a)
call TT_StartEx(function Move_Dummy,a,.05)
call TriggerSleepAction(2.5)
set a.b = true
call GroupClear(a.g)
call GroupClear(Temp)
call DestroyGroup(a.g)
call a.destroy()
endfunction
private function init takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Spell_Check))
call TriggerAddAction(t,function Effects)
endfunction
endscope
</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>
scope BurningHell initializer init
//Edited by kingking
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//***********************************************************************************************************//
//@@////////////////////////////////////Burning Hell, Made By Komaqtion////////////////////////////////////@@//
//@@ @@//
//@@ How to import: @@//
//@@ @@//
//@@ ¤ First copy the ability "Burning Hell" and the unit "Dummy" and change the ID's in the @@//
//@@ constants below to the new ones. Then you need to import Vexorian's dummy.mdx file from @@//
//@@ this map, or another, and change "Dummy" unit's model to this one. Then, of course, you @@//
//@@ need to import the triggers, which are in the categories "The Spell" and @@//
//@@ "Required Systems". Then you're free to change any of the given global constants to suit @@//
//@@ your needs. @@//
//@@ @@//
//@@ Requirements: @@//
//@@ ¤ This spell, of course ! @@//
//@@ ¤ Timer Ticker, made by Cohadar <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> @@//
//@@ ¤ The dummy.mdx, made by Vexorian ! @@//
//@@ @@//
//@@ ¤ Credits to: @@//
//@@ * Vexorian, for the dummy.mdx file @@//
//@@ * Cohadar for TT (Timer Ticker) @@//
//@@ * Jesus4Lyf, for KeyTimers 2 (Even if this spell doesn't use it anymore XD) @@//
//@@ * TriggerHappy187, for TimedHandles (Even if this spell doesn't use it anymore XD) @@//
//@@ @@//
//@@ And, of course, so many thanks to all of the many helpfull people at TheHelper.net @@//
//@@ who has helped get is spell working! (kingkingyyk3 and WolfieNoCT especially <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />) @@//
//@@ @@//
//@@ @@//
//@@ Note: This is my very first fully working, and quite good, spell made completely in vJASS. @@//
//@@ @@//
//@@ So much feedback, and suggestions are very much welcome, and maybe some tips to make it @@//
//@@ even better would be nice <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> @@//
//@@ @@//
//@@///////////////////////////////////////////////////////////////////////////////////////////////////////@@//
//***********************************************************************************************************//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
globals
// Effects! Change as you'd like <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />\\
private constant string EFFECT_C = "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" // Effect on the caster!
private constant string EFFECT_1 = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl" // Effect 200 range from the caster!
private constant string EFFECT_2 = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" // Effect at the end!
private constant string DUMMY_EFFECT = "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" // Effect on the moving dummy!
// ID's! Change to the ID's on your map <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />\\
private constant integer SPELL_ID = 039;0000039; // ID of the spell!
private constant integer DUMMY_ID = 039;h000039; // ID of the dummy unit!
private constant integer LOCUST = 039;Aloc039; // ID of the "Locust" ability! (Might not need changing)
private constant integer BUFF_ID = 039;BTLF039; // ID of the expiration buff on the dummy!
// Other constant integers! Change at will <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />\\
private constant real DAMAGE_FACTOR = 1.
private constant real RANGE_FACTOR = 15.
private constant integer ANGLES = 16 // The number of agles the effects will show at! (360/ANGLES)
private constant attacktype ATTACK_TYPE = ATTACK_TYPE_NORMAL // Explains itself i think XD
private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_NORMAL // Same here <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />
private constant real SLIDE_SPEED = 10 // How much the dummy effect moves each 0.05 seconds!
endglobals
globals
// Globals! Simply DON'T CHANGE!\\
private integer TempStructIndex
private group Temp = CreateGroup()
endglobals
private struct Data
unit array du [ANGLES]
unit cs
real array pointx [ANGLES]
real array pointy [ANGLES]
boolean b
player p
group g = CreateGroup()
integer lvl
effect array e [ANGLES]
integer ticks
static method create takes unit u returns Data
local Data a = Data.allocate()
set a.cs = u
set a.b = false
set a.p = GetOwningPlayer(u)
set a.lvl = GetUnitAbilityLevel(a.cs,SPELL_ID)
return a
endmethod
endstruct
// Some more configurables that needed the struct!\\
// Damage functions!\\
private function Damage_Small takes nothing returns real
return DAMAGE_FACTOR * 10
endfunction
private function Damage_Medium takes integer lv returns real
return 50 + lv * DAMAGE_FACTOR * 50
endfunction
private function Damage_High takes integer lv returns real
return lv * DAMAGE_FACTOR * 100
endfunction
// Range functions!\\
private function Range_Small takes nothing returns real
return RANGE_FACTOR * 5
endfunction
private function Range_Medium takes nothing returns real
return RANGE_FACTOR * 10
endfunction
private function Range_High takes nothing returns real
return RANGE_FACTOR * RANGE_FACTOR
endfunction
// End of Configuration!\\
private function Spell_Check takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function GroupEm takes nothing returns boolean
return GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitEnemy(GetFilterUnit(), Data(TempStructIndex).p) and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false and IsUnitInGroup(GetFilterUnit(),Data(TempStructIndex).g) == false
endfunction
private function Smaller_GroupEm takes nothing returns boolean
return GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitEnemy(GetFilterUnit(), Data(TempStructIndex).p) and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false
endfunction
private function Move_Dummy takes nothing returns boolean
local Data a = TT_GetData()
local real xd
local real yd
local integer i = 1
local unit temp
if a.ticks > 0 then
set a.ticks = a.ticks - 1
loop
exitwhen i>=ANGLES
set xd = GetUnitX(a.du<i>)
set yd = GetUnitY(a.du<i>)
set a.pointx<i> = xd+SLIDE_SPEED*Cos(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set a.pointy<i> = yd+SLIDE_SPEED*Sin(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set TempStructIndex = a
call GroupEnumUnitsInRange(Temp, a.pointx<i>, a.pointy<i>, Range_Small(), Condition(function Smaller_GroupEm))
loop
set temp = FirstOfGroup(Temp)
exitwhen temp == null
call UnitDamageTarget(a.cs, temp, Damage_Small(), true, false, ATTACK_TYPE, DAMAGE_TYPE, null)
call GroupAddUnit(a.g,temp)
call GroupRemoveUnit(Temp,temp)
endloop
call SetUnitX(a.du<i>,a.pointx<i>)
call SetUnitY(a.du<i>,a.pointy<i>)
set i = i+1
endloop
return false
else
loop
exitwhen i >=ANGLES
set a.pointx<i> = GetUnitX(a.du<i>)
set a.pointy<i> = GetUnitY(a.du<i>)
call DestroyEffect(a.e<i>)
call DestroyEffect(AddSpecialEffect(EFFECT_2,a.pointx<i>,a.pointy<i>))
set TempStructIndex = a
call GroupEnumUnitsInRange(Temp, a.pointx<i>, a.pointy<i>, Range_High(), Condition(function Smaller_GroupEm))
loop
set temp = FirstOfGroup(Temp)
exitwhen temp == null
call UnitDamageTarget(a.cs, temp, Damage_High(a.lvl), true, false, ATTACK_TYPE, DAMAGE_TYPE, null)
call GroupRemoveUnit(Temp,temp)
endloop
call RemoveUnit(a.du<i>)
set i = i+1
endloop
call a.destroy()
return true
endif
endfunction
private function Effects takes nothing returns nothing
local Data a = Data.create(GetTriggerUnit())
local real xu = GetUnitX(a.cs)
local real yu = GetUnitY(a.cs)
local integer i = 1
local unit temp
call DestroyEffect(AddSpecialEffect(EFFECT_C,xu,yu))
loop
exitwhen i>=ANGLES
set a.pointx<i> = xu+200*Cos(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set a.pointy<i> = yu+200*Sin(I2R(i*(360/(ANGLES-1)))*bj_DEGTORAD)
set TempStructIndex = a
call DestroyEffect(AddSpecialEffect(EFFECT_1, a.pointx<i>, a.pointy<i>))
call GroupEnumUnitsInRange(Temp, a.pointx<i>, a.pointy<i>,Range_Medium(), Condition(function GroupEm))
loop
set temp = FirstOfGroup(Temp)
exitwhen temp == null
call UnitDamageTarget(a.cs, temp, Damage_Medium(a.lvl), true, false, ATTACK_TYPE, DAMAGE_TYPE, null)
call GroupAddUnit(a.g,temp)
call GroupRemoveUnit(Temp,temp)
endloop
set a.du<i> = CreateUnit(a.p,DUMMY_ID,xu,yu,bj_RADTODEG*Atan2(a.pointy<i>-yu,a.pointx<i>-xu))
call UnitAddAbility(a.du<i>,LOCUST)
set a.e<i> = AddSpecialEffectTarget(DUMMY_EFFECT,a.du<i>,"origin")
set i = i+1
endloop
set a.ticks = R2I( 2.5 / .05)
call TT_StartEx(function Move_Dummy,a,.05)
call GroupClear(a.g)
call GroupClear(Temp)
endfunction
private function init takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Spell_Check))
call TriggerAddAction(t,function Effects)
endfunction
endscope
</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>