Tinki3
Special Member
- Reaction score
- 418
Everything is fine about this trigger, except when I try to enable it, it comes up with the error ( I have made that line red):
I also have another Q:
How multi instanceable is this trigger?
Anyone who helps alot will get +rep
Thx in advance.
Line 112: Invalid number of arguments
Code:
function WS_Ability_ID takes nothing returns boolean
return GetSpellAbilityId() == 'A004'
endfunction
function WS_Filter_unit takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true)
endfunction
function Move_Caster takes nothing returns nothing
local unit WS_Picked_unit = GetEnumUnit()
local location WS_Picked_unit_loc = GetUnitLoc(WS_Picked_unit)
local integer gh = GetUnitAbilityLevelSwapped('A004',GetTriggerUnit())
local real kj = GetRandomReal(50.00,(I2R(GetUnitAbilityLevelSwapped('A004',GetTriggerUnit()))*75.00))
call SetUnitPositionLoc(GetTriggerUnit(),WS_Picked_unit_loc)
call AddSpecialEffectTargetUnitBJ("chest",WS_Picked_unit, "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" )
call DestroyEffectBJ(GetLastCreatedEffectBJ())
call UnitDamageTargetBJ(GetTriggerUnit(),WS_Picked_unit, kj,ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL)
call CreateNUnitsAtLoc(1,'h003',GetOwningPlayer(GetTriggerUnit()),WS_Picked_unit_loc, 0.00)
call SetUnitAbilityLevelSwapped('A005', GetLastCreatedUnit(), gh)
call IssueTargetOrderBJ(GetLastCreatedUnit(),"thunderbolt",WS_Picked_unit)
call UnitApplyTimedLifeBJ(1.50,'BTLF',GetLastCreatedUnit())
call RemoveLocation(WS_Picked_unit_loc)
set WS_Picked_unit_loc = null
set WS_Picked_unit = null
endfunction
function Trig_Water_Strike_Actions takes nothing returns nothing
local unit WS_Caster = GetTriggerUnit()
local location WS_Caster_loc = GetUnitLoc(WS_Caster)
local integer mb = (R2I(GetUnitAbilityLevelSwapped('A004',WS_Caster)))
local group WS_Group
call ShowUnit(WS_Caster, false)
call PolledWait(5, - mb)
call [COLOR="Red"]ForGroupBJ(GetUnitsInRangeOfLocMatching(600.00,WS_Caster_loc),Condition(function WS_Filter_unit)), function Move_Caster)[/COLOR]
call ShowUnit(WS_Caster, true)
call RemoveLocation(WS_Caster_loc)
call DestroyGroup(WS_Group)
set WS_Group = null
set WS_Caster = null
set WS_Caster_loc = null
endfunction
//===========================================================================
function InitTrig_Water_Strike takes nothing returns nothing
set gg_trg_Water_Strike = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Water_Strike,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Water_Strike,Condition(function WS_Ability_ID))
call TriggerAddAction(gg_trg_Water_Strike,function Trig_Water_Strike_Actions)
endfunction
How multi instanceable is this trigger?
Anyone who helps alot will get +rep
Thx in advance.