Hello, I've been having some problems with this spell i'm making. I firstly did it in GUI and then converted it to Jass and started editing. I added local variables to make sure the trigger rememberd the targets and dummy even though i inserted a wait command.
But now when i save i get tons of errors. Could someone look thru the code and see if they can find the problem? I will highlight the part that I altered after converting to jass
Thanks!
But now when i save i get tons of errors. Could someone look thru the code and see if they can find the problem? I will highlight the part that I altered after converting to jass
JASS:
function Trig_Force_of_Nature_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A066039; ) ) then
return false
endif
return true
endfunction
function Trig_Force_of_Nature_Copy_Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD) == false )
endfunction
function Trig_Force_of_Nature_Copy_Func003001003002 takes nothing returns boolean
return ( IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Force_of_Nature_Copy_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Force_of_Nature_Copy_Func003001003001(), Trig_Force_of_Nature_Copy_Func003001003002() )
endfunction
----------------------------thi is where i edited-----------------------------------------------------------------------
function Trig_Force_of_Nature_Copy_Func003A takes nothing returns nothing
local unit ua = GetTriggeringUnit()
local unit ub = CreateNUnitsAtLoc( 1, 039;h010039;, GetOwningPlayer(GetSpellAbilityUnit()), GetUnitLoc(GetEnumUnit()), 0.00 )
local unit uc = GetEnumUnit()
call UnitApplyTimedLifeBJ( 3.50, 039;BTLF039;, u2 )
call UnitAddAbilityBJ( 039;A06F039;, u2 )
call IssueTargetOrderBJ( u2, "entanglingroots", GetEnumUnit() )
call UnitDamageTargetBJ( u2, u3, ( ( 15.00 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit())) ) + ( 0.25 * udg_Spell_Power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call TriggerSleepAction( 0.50 )
call UnitDamageTargetBJ( u2, u3, ( ( 15.00 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit())) ) + ( 0.25 * udg_Spell_Power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call TriggerSleepAction( 0.50 )
call UnitDamageTargetBJ( u2, u3, ( ( 15.00 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit())) ) + ( 0.25 * udg_Spell_Power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
call TriggerSleepAction( 0.50 )
call UnitDamageTargetBJ( u2, u3, ( ( 15.00 * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit())) ) + ( 0.25 * udg_Spell_Power[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_LIGHTNING )
endfunction
------------------------this is where i edited---------------------------------------------------------
function Trig_Force_of_Nature_Copy_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(350.00, GetSpellTargetLoc(), Condition(function Trig_Force_of_Nature_Copy_Func003001003)), function Trig_Force_of_Nature_Copy_Func003A )
endfunction
//===========================================================================
function InitTrig_Force_of_Nature_Copy takes nothing returns nothing
set gg_trg_Force_of_Nature_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Force_of_Nature_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Force_of_Nature_Copy, Condition( function Trig_Force_of_Nature_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Force_of_Nature_Copy, function Trig_Force_of_Nature_Copy_Actions )
endfunction
Thanks!