- Joined
- Nov 15, 2010
- Messages
- 112
hey, i tried to make Hellfire with JASS trigger but whats up with this trigger??? Is this right or not???
JASS:
function Hellfire_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Hellfire_Actions takes nothing returns nothing
set udg_caster = GetTriggerUnit()
set udg_castrloc = GetUnitLoc(udg_caster)
set udg_castrface = GetUnitFacing(udg_caster)
set udg_targetloc = GetSpellTargetLoc()
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'hfoo', GetOwningPlayer(udg_caster), PolarProjectionBJ(udg_castrloc, 256, udg_castrface), bj_UNIT_FACING )
set udg_dummy = GetLastCreatedUnit ()
set udg_dummyloc = GetUnitLoc(udg_dummy)
call UnitAddAbilityBJ( 'A000' , udg_dummy )
call UnitApplyTimedLifeBJ( 1.50, 'BTLF', udg_dummy )
call IssueImmediateOrderBJ( udg_dummy, "thunderclap" )
call AddSpecialEffectLocBJ( udg_dummyloc, "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Hellfire takes nothing returns nothing
set gg_trg_Hellfire = CreateTrigger( )
call TriggerAddAction( gg_trg_Hellfire, function Hellfire_Actions )
endfunction