- Joined
- Dec 22, 2007
- Messages
- 35
Hello, I'm having trouble setting up this trigger because line 51 is giving me errors (it's underlined/italicized/bolded). It says " Expected ' " when I call this. All I'm trying to figure out is how to convert GUI to Jass to avoid the use of excessive global variables. If someone can help me figure out this scenario I can probably figure out the rest.
Thanks!
Thanks!
JASS:
function Trig_DischargeTarget_Copy_Func003C takes nothing returns boolean
if ( ( 'A005' == GetSpellAbilityId() ) ) then
return true
endif
if ( ( 'A006' == GetSpellAbilityId() ) ) then
return true
endif
if ( ( 'A001' == GetSpellAbilityId() ) ) then
return true
endif
if ( ( 'A003' == GetSpellAbilityId() ) ) then
return true
endif
return false
endfunction
function Trig_DischargeTarget_Copy_Conditions takes nothing returns boolean
if ( not Trig_DischargeTarget_Copy_Func003C() ) then
return false
endif
return true
endfunction
function Trig_DischargeTarget_Copy_Func006A takes unit Discharge_Target returns nothing
call UnitAddAbilityBJ( 'A004', GetEnumUnit() )
call SetUnitAbilityLevelSwapped( 'A004', GetEnumUnit(), GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit()) )
call IssueTargetOrderBJ( GetEnumUnit(), "chainlightning", Discharge_Target )
call AddSpecialEffectTargetUnitBJ( "chest", GetEnumUnit(), "Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl" )
set udg_CotR_effects[udg_Discharge_Effects] = GetLastCreatedEffectBJ()
set udg_Discharge_Effects = ( udg_Discharge_Effects + 1 )
endfunction
function Trig_DischargeTarget_Copy_Func008A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
call DestroyEffectBJ( udg_CotR_effects[udg_Discharge_Effects] )
set udg_Discharge_Effects = ( udg_Discharge_Effects - 1 )
endfunction
function Trig_DischargeTarget_Copy_Actions takes nothing returns nothing
local unit Discharge_Target = GetSpellTargetUnit()
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - 80.00 ) )
set bj_forLoopAIndex = 0
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLocFacingLocBJ( 1, 'e000', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()), 250.00, ( I2R(GetForLoopIndexA()) * 60.00 )), GetUnitLoc(GetSpellTargetUnit()) )
call GroupAddUnitSimple( GetLastCreatedUnit(), udg_LightningGroup )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 3.00 )
[U][I][B]call ForGroupBJ( udg_LightningGroup, function Trig_DischargeTarget_Copy_Func006A(Discharge_Target) )[/B][/I][/U]
call TriggerSleepAction( 1.20 )
call ForGroupBJ( udg_LightningGroup, function Trig_DischargeTarget_Copy_Func008A )
endfunction
//===========================================================================
function InitTrig_DischargeTarget_Copy takes nothing returns nothing
set gg_trg_DischargeTarget_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DischargeTarget_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DischargeTarget_Copy, Condition( function Trig_DischargeTarget_Copy_Conditions ) )
call TriggerAddAction( gg_trg_DischargeTarget_Copy, function Trig_DischargeTarget_Copy_Actions )
endfunction
Last edited by a moderator: