- Joined
- Aug 1, 2007
- Messages
- 66
I'm trying to figure out what the undeclared function is here. It's in the if (UNIT_STATE_LIFE(target)>damage[level]) then line at the begining of the loop. Also, some explanation of what undelcared function is would be nice.
JASS:
function Trig_Quick_Blades_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local unit target = GetSpellTargetUnit()
local integer level = GetUnitAbilityLevel(caster,'A0AY')
local real array damage
local effect effect1
local effect effect2
local location loc1
local location loc2
local integer hits = 4
set damage[1] = 20
set damage[2] = 25
set damage[3] = 31.25
set damage[4] = 39.06
set damage[5] = 48.83
set damage[6] = 61.04
set damage[7] = 76.29
set damage[8] = 95.37
set damage[9] = 119.21
set damage[10] = 149.01
call PolledWait( 0.01 )
call SetUnitTimeScalePercent( caster, 200.00 )
call AddSpecialEffectTargetUnitBJ( "hand, right", caster, "Abilities\\Spells\\NightElf\\SpiritOfVengeance\\SpiritOfVengeanceBirthMissile.mdl" )
set effect1 = GetLastCreatedEffectBJ()
call AddSpecialEffectTargetUnitBJ( "hand, left", caster, "Abilities\\Spells\\NightElf\\SpiritOfVengeance\\SpiritOfVengeanceBirthMissile.mdl" )
set effect2 = GetLastCreatedEffectBJ()
loop
exitwhen hits == 0
if (UNIT_STATE_LIFE(target)>damage[level]) then
set hits = (hits-1)
call SetUnitAnimation( caster, "attack" )
set loc1 = GetUnitLoc(target)
set loc2 = GetRandomLocInRect(RectFromCenterSizeBJ(loc1, 80.00, 80.00))
call SetUnitFacingToFaceUnitTimed( caster, target, 0 )
call SetUnitPositionLocFacingLocBJ( caster, loc2, loc1 )
call UnitDamageTargetBJ( caster, target, damage[level], ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "chest", caster, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectTargetUnitBJ( "chest", target, "Abilities\\Weapons\\ZigguratMissile\\ZigguratMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call TriggerSleepAction( 0.15 )
else
call SetUnitAnimation( caster, "attack" )
call SetUnitTimeScalePercent( caster, 25.00 )
call SetUnitTimeScalePercent( target, 25.00 )
call PolledWait( 1.85 )
call AddSpecialEffectTargetUnitBJ( "head", target, "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call UnitDamageTargetBJ( caster, target, damage[level], ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set hits = 0
endif
endloop
call SetUnitTimeScalePercent( caster, 100.00 )
call SetUnitVertexColorBJ( caster, 100.00, 100.00, 100.00, 0.00 )
call DestroyEffectBJ( effect1 )
call DestroyEffectBJ( effect2 )
call RemoveLocation (loc1)
call RemoveLocation (loc2)
set caster = null
set target = null
set effect1 = null
set effect2 = null
set loc1 = null
set loc2 = null
endfunction