well i make this in assShopPro and then add to the WE, when i try to save the map, it doenst show any errors, but just close the WE...need help. thx
JASS:
function BlindMiss takes nothing returns integer
return 039;A036039;
endfunction
function BlindMov takes nothing returns integer
return 039;A035039;
endfunction
function BlindingBlowRaw takes nothing returns integer
return 039;A037039;
endfunction
function Trig_Blinding_Blow_Conditions takes nothing returns boolean
return GetSpellAbilityId == BlindMiss()
endfunction
function BlindingBlow_Dmg takes integer lvl returns real
return 45 + I2R(20*(lvl))
endfunction
function BlindBlow_lvl1 takes nothing returns boolean
return GetUnitAbilityLevel(u, BlindingBlowRaw()) == 1
endfunction
function Trig_Blinding_Blow_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local unit d
call AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", u, "chest")
call SetUnitPosition (u, GetUnitX(t), GetUnitY(t))
call AddSpecialEffect ("Abilities\Spells\NightElf\Blink\BlinkTarget.mdl", GetUnitX(u), GetUnitY(u))
call UnitDamageTarget (u, t, BlindingBlow_Dmg(GetUnitAbilityLevel(u,BlindingBlowRaw())),TRUE, FALSE, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null )
if (BlindBlow_lvl1()) then
set d = CreateUnit(GetOwningPlayer(u), 039;h000039;, GetUnitX(u), GetUnitY(u),270)
call UnitAddAbility(d, BlindMiss())
call SetUnitAbilityLevel(d, BlindMiss(), 1)
call IssueTargetOrder (d, "curse", t)
set d = CreateUnit(GetOwningPlayer(u), 039;h000039;, GetUnitX(u), GetUnitY(u),270)
call UnitAddAbility(d, BlindMov())
call SetUnitAbilityLevel(d, BlindMiss(), 1)
call IssueTargetOrder (d, "bloodlust", u)
endif
endfunction
//===========================================================================
function InitTrig_Blinding_Blow takes nothing returns nothing
set gg_trg_Blinding_Blow = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blinding_Blow, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Blinding_Blow, Condition( function Trig_Blinding_Blow_Conditions ))
call TriggerAddAction( gg_trg_Blinding_Blow, function Trig_Blinding_Blow_Actions )
endfunction