- Joined
- Feb 14, 2005
- Messages
- 48
Yea, the spell effects work, but the returning values are screwed up. Someone tell me whats wrong, heres the script.
JASS:
function Trig_Desert_Graveyard_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00H'
endfunction
function Trig_Desert_Graveyard_Func004Func006Func001C takes nothing returns boolean
return IsUnitType(GetEnumUnit(), UNIT_TYPE_FLYING) == false
return IsUnitEnemy(GetEnumUnit(), GetOwningPlayer(GetSpellAbilityUnit())) == true
endfunction
function Trig_Desert_Graveyard_Func004Func006A takes nothing returns nothing
local unit a = GetSpellAbilityUnit()
local unit b
local location c = GetSpellTargetLoc()
return Trig_Desert_Graveyard_Func004Func006Func001C()
call UnitDamageTargetBJ( a, GetEnumUnit(), 85.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call CreateNUnitsAtLocFacingLocBJ( 1, 'h000', GetOwningPlayer(a), c, c )
set b = GetLastCreatedUnit()
call IssueTargetOrderBJ( b, "entanglingroots", GetEnumUnit() )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', b )
set a = null
set b = null
call RemoveLocation(c)
endfunction
function Trig_Desert_Graveyard_Actions takes nothing returns nothing
local location e = GetSpellTargetLoc()
local unit d = GetSpellAbilityUnit()
local integer f = 1
local integer g = 30
local real h
local real i
call TerrainDeformationRippleBJ( 9, false, e, 100.00, 500.00, 55.00, 0.30, 50.00 )
loop
exitwhen f > g
set h = GetRandomDirectionDeg()
set i = GetRandomDirectionDeg()
call TriggerSleepAction( 0.10 )
call AddSpecialEffectLocBJ( PolarProjectionBJ(e, h, i), "Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call ForGroupBJ( GetUnitsInRangeOfLocAll(125.00, PolarProjectionBJ(e, h, i)), function Trig_Desert_Graveyard_Func004Func006A )
set f = f + 1
endloop
set d = null
call RemoveLocation(e)
endfunction
//===========================================================================
function InitTrig_Desert_Graveyard takes nothing returns nothing
set gg_trg_Desert_Graveyard = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Desert_Graveyard, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Desert_Graveyard, Condition( function Trig_Desert_Graveyard_Conditions ) )
call TriggerAddAction( gg_trg_Desert_Graveyard, function Trig_Desert_Graveyard_Actions )
endfunction