Komaqtion
You can change this now in User CP.
- Reaction score
- 469
ok thanks
function H2I takes handle h returns integer
return h
return 0
endfunction
function CheckLeak takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CAST)
call DestroyTrigger(t)
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(H2I(t)))
set t=null
endfunction
function InitTrig_Leak_Test takes nothing returns nothing
call TimerStart(CreateTimer(), 1, true, function CheckLeak)
endfunction
function Spell_Check takes nothing returns boolean
return (GetSpellAbilityId() == 039;0000039;)
endfunction
function True takes nothing returns boolean
return true
endfunction
function H2I takes handle h returns integer
return h
return 0
endfunction
function Effects takes nothing returns nothing
local string o = "move"
local integer i = 0
local string e = "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
local string e2 = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl"
local unit u = GetTriggerUnit()
local real xu = GetUnitX(u)
local real yu = GetUnitY(u)
local real x
local real y
local player p = GetOwningPlayer(u)
local integer unitid = 039;h000039;
local integer aid = 039;Aloc039;
local integer bid = 039;BTLF039;
local unit du
call DestroyEffect(AddSpecialEffect(e,xu,yu))
loop
exitwhen i>16
set x = xu+200*Cos((i*22.5)*bj_DEGTORAD)
set y = yu+200*Sin((i*22.5)*bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect(e,x,y))
call DestroyEffect(AddSpecialEffect(e2,x,y))
call UnitDamagePoint(u,0,10,x,y,50,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set du = CreateUnit(p,unitid,xu,yu,bj_RADTODEG*Atan2(y-yu,x-xu))
call UnitApplyTimedLife(du,bid,2.)
call UnitAddAbility(du,aid)
call IssuePointOrder(u,o,x,y)
set x = 0
set y = 0
set i = i+1
set du = null
endloop
set u = null
set p = null
set unitid = 0
set aid = 0
set bid = 0
set i = 0
set xu = 0
set yu = 0
endfunction
function Spell takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function Spell_Check))
call TriggerAddAction(t,function Effects)
call TriggerAddAction(t,function True)
call DestroyTrigger(t)
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, I2S(H2I(t)))
set t=null
endfunction
function InitTrig_Leak_Test takes nothing returns nothing
call TimerStart(CreateTimer(), 1, true, function Spell)
endfunction
function Spell_Check takes nothing returns boolean
return (GetSpellAbilityId() == 039;0000039;)
endfunction
function Effects takes nothing returns nothing
local string o = "move"
local integer i = 0
local string e = "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
local string e2 = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl"
local unit u = GetTriggerUnit()
local real xu = GetUnitX(u)
local real yu = GetUnitY(u)
local real x
local real y
local player p = GetOwningPlayer(u)
local integer unitid = 039;h000039;
local integer aid = 039;Aloc039;
local integer bid = 039;BTLF039;
local unit du
call DestroyEffect(AddSpecialEffect(e,xu,yu))
loop
exitwhen i>16
set x = xu+200*Cos((i*22.5)*bj_DEGTORAD)
set y = yu+200*Sin((i*22.5)*bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect(e,x,y))
call DestroyEffect(AddSpecialEffect(e2,x,y))
call UnitDamagePoint(u,0,10,x,y,50,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
set du = CreateUnit(p,unitid,xu,yu,bj_RADTODEG*Atan2(y-yu,x-xu))
call UnitApplyTimedLife(du,bid,2.)
call UnitAddAbility(du,aid)
call IssuePointOrder(u,o,x,y)
set x = 0
set y = 0
set i = i+1
set du = null
endloop
set u = null
set p = null
set unitid = 0
set aid = 0
set bid = 0
set i = 0
set xu = 0
set yu = 0
endfunction
function InitTrig_<The trigger name goes here> 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
how do i know how long it takes for a unit with the movement speed 100 to move 200 distance