heres my problem, the trigger doesnt execute
what i tried:
changing ability hitself Made with Channel
added chat message in trigger itself to see if it run : nothing appear, if i remove all variable , triggers work and goes on
tryed with multiple kind of effect and condition and events, so only things i think its maybe the dot system itself...... i dont know jass enought to be able to fix it or see whats the problem!!à
ill give rep for help ^^
the code
what i tried:
changing ability hitself Made with Channel
added chat message in trigger itself to see if it run : nothing appear, if i remove all variable , triggers work and goes on
tryed with multiple kind of effect and condition and events, so only things i think its maybe the dot system itself...... i dont know jass enought to be able to fix it or see whats the problem!!à
ill give rep for help ^^
JASS:
library DOT initializer Init
//DOT system current version 1.1 - Personally updated by Wizardum
private keyword Data
globals
private constant real interval = 0.05
private timer tim
private Data array dat
private integer total = 0
group DOTunits
endglobals
private function Loop takes nothing returns nothing
local Data d
local integer i = 0
local real array r
loop
exitwhen i >= total
set d = dat[i]
set r[1] = d.dmg * d.dur
set r[2] = d.heal * d.dur
set r[3] = GetWidgetLife( d.target )
if r[3] < 0.405 then
set d.dmgcount = r[1]
set d.healcount = r[2]
endif
set d.counter = d.counter + interval
if d.counter >= d.icheck then
set d.counter = 0.
if d.dmgcount < r[1] or d.healcount < r[2] then
set d.dmgcount = d.dmgcount + d.dmg
set d.healcount = d.healcount + d.heal
call SetWidgetLife( d.target, GetWidgetLife( d.target) + d.heal )
call UnitDamageTarget( d.source, d.target, d.dmg, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
call DestroyEffect( AddSpecialEffectTarget( d.insEffect, d.target, d.attach ) )
else
call DestroyEffect( d.effectOT )
set d.effectOT = null
set d.source = null
set d.target = null
call d.destroy( )
set total = total - 1
set dat[i] = dat[total]
endif
endif
set i = i + 1
endloop
if total == 0 then
call PauseTimer( tim )
endif
endfunction
private struct Data
unit source
unit target
real dmg
real heal
real dur
real icheck
string insEffect
effect effectOT
string attach
real counter
real dmgcount
real healcount
static method Create takes unit source, unit target, real dmg, real heal, real dur, real icheck, string insEffect, effect effectOT, string attach returns nothing
local Data d = Data.allocate( )
set d.source = source
set d.target = target
set d.dmg = dmg / dur / icheck
set d.heal = heal / dur / icheck
set d.dur = dur
set d.icheck = icheck
set d.insEffect = insEffect
set d.effectOT = effectOT
if attach == "" then
set d.attach = "chest"
else
set d.attach = attach
endif
set d.counter = 0.
set d.dmgcount = 0.
set d.healcount = 0.
call GroupAddUnit( DOTunits, d.target )
if total == 0 then
call TimerStart( tim, interval, true, function Loop )
endif
set dat[total] = d
set total = total + 1
endmethod
endstruct
function DamageAttach takes unit source, unit target, real totaldmg, real duration, real intervalcheck, string insEffect, string effectOT, string attach returns nothing
local effect e
if not IsUnitInGroup( target, DOTunits ) then
set e = AddSpecialEffectTarget( effectOT, target, attach )
call Data.Create( source, target, totaldmg, 0., duration, intervalcheck, insEffect, e, attach )
set e = null
endif
endfunction
function HealAttach takes unit target, real totalheal, real duration, real intervalcheck, string insEffect, string effectOT, string attach returns nothing
local effect e
if not IsUnitInGroup( target, DOTunits ) then
set e = AddSpecialEffectTarget( effectOT, target, attach )
call Data.Create( null, target, 0., totalheal, duration, intervalcheck, insEffect, e, attach )
set e = null
endif
endfunction
private function Init takes nothing returns nothing
set tim = CreateTimer( )
endfunction
endlibrary
the code
-
Suiton suiron Copy
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Suiton Suiron no jutsu
-
-
Actions
-
Set DOT_Source = (Casting unit)
-
Set DOT_Target = (Target unit of ability being cast)
-
Set DOT_Dmg = (0.50 x ((Real((Level of (Ability being cast) for (Casting unit)))) x ((Real((Strength of (Casting unit) (Exclude bonuses)))) + 25.00)))
-
Set DOT_Duration = 5.00
-
Set DOT_Interval = 1.00
-
Set DOT_Effect = "SeaAura.mdl"
-
Set DOT_AttachedEffect = <Empty String>
-
Set DOT_AttachPoint = "chest"
-
Custom script: call DamageAttach( udg_DOT_Source, udg_DOT_Target, udg_DOT_Dmg, udg_DOT_Duration, udg_DOT_Interval, udg_DOT_Effect, udg_DOT_AttachedEffect, udg_DOT_AttachPoint )
-
Game - Display to (All players) the text: WORKED ?
-
-