Komaqtion
You can change this now in User CP.
- Reaction score
- 469
Thanks T.s.e !! That explains some things for me
EDIT: Ok here's the trigger atm, but now it doesn't move the dummies
I had to merge the tywo triggers you gave me, T.s.e and kingkingyyk3, and i'm not sure i've done it correctly :S
EDIT2: Now i also tried to implement the timed effect in the system too, but now the dummies aren't even getting created
What's wrong?
Could you take a look?
EDIT: Ok here's the trigger atm, but now it doesn't move the dummies
I had to merge the tywo triggers you gave me, T.s.e and kingkingyyk3, and i'm not sure i've done it correctly :S
EDIT2: Now i also tried to implement the timed effect in the system too, but now the dummies aren't even getting created
What's wrong?
Could you take a look?
JASS:
scope Dummy initializer init
globals
private constant string e = "Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl"
private constant string e2 = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl"
private constant string e1 = "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl"
private constant integer SPELL_ID = 039;0000039;
private constant integer unitid = 039;h000039;
private constant integer aid = 039;Aloc039;
private constant integer bid = 039;BTLF039;
private player p
endglobals
private struct Data
unit array du [17]
unit cs
real array pointx [17]
real array pointy [17]
boolean b
static method create takes unit u returns Data
local Data a = Data.allocate()
set a.cs = u
set a.b = false
return a
endmethod
endstruct
private function Spell_Check takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function GroupEm takes nothing returns boolean
if GetWidgetLife(GetFilterUnit()) > 0.405 and IsUnitEnemy(GetFilterUnit(), p) and IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false then
call UnitDamageTarget(GetFilterUnit(), GetFilterUnit(), 50, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
endif
return false
endfunction
function DestroyEffectAfterTime takes effect f, string path, real x, real y, real t returns nothing
call TriggerSleepAction(t)
call DestroyEffect(f)
call DestroyEffect(AddSpecialEffect(path,x,y))
endfunction
private function Move_Dummy takes nothing returns boolean
local Data a = KT_GetData()
local group g
local real xd
local real yd
local integer i = 0
set p = GetOwningPlayer(a.cs)
loop
exitwhen i==16
set xd = GetUnitX(a.du<i>)
set yd = GetUnitY(a.du<i>)
set a.pointx<i> = xd+10*Cos((i*22.5)*bj_DEGTORAD)
set a.pointy<i> = yd+10*Sin((i*22.5)*bj_DEGTORAD)
call GroupEnumUnitsInRange(g, a.pointx<i>, a.pointy<i>, 10, Filter(function GroupEm))
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 = 0
local group g = CreateGroup()
set p = GetOwningPlayer(a.cs)
call DestroyEffect(AddSpecialEffect(e,xu,yu))
loop
exitwhen i>=16
set a.pointx<i> = xu+200*Cos((i*22.5)*bj_DEGTORAD)
set a.pointy<i> = yu+200*Sin((i*22.5)*bj_DEGTORAD)
call DestroyEffect(AddSpecialEffect(e,a.pointx<i>,a.pointy<i>))
call DestroyEffect(AddSpecialEffect(e2,a.pointx<i>,a.pointy<i>))
set p = GetOwningPlayer(a.cs)
call GroupEnumUnitsInRange(g, a.pointx<i>, a.pointy<i>, 10, Filter(function GroupEm))
set a.du<i> = CreateUnit(p,unitid,xu,yu,bj_RADTODEG*Atan2(a.pointy<i>-yu,a.pointx<i>-xu))
call UnitApplyTimedLife(a.du<i>,039;BTLF039;,2.5)
call UnitAddAbility(a.du<i>,aid)
set i = i+1
endloop
call KT_Add(function Move_Dummy,a,.05)
set p = null
call TriggerSleepAction(2.5)
set a.b = true
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)
set t = null
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>