What's the Problem with this?

MaaxeEvid

New Member
Reaction score
8
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 'A036'
endfunction

function BlindMov takes nothing returns integer
    return 'A035'
endfunction

function BlindingBlowRaw takes nothing returns integer
    return 'A037'
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), 'h000', GetUnitX(u), GetUnitY(u),270)
        call UnitAddAbility(d, BlindMiss())
        call SetUnitAbilityLevel(d, BlindMiss(), 1)
        call IssueTargetOrder (d, "curse", t)
        set d = CreateUnit(GetOwningPlayer(u), 'h000', 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
 

MaaxeEvid

New Member
Reaction score
8
nothing works, when i put it into world editor, it just crashes,

"worldeditor.exe need to be closed", like this, "Send...Dont Send"

it dont point whats wrong, cause this i'm asking it here .
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
JASS:
function Trig_Blinding_Blow_Conditions takes nothing returns boolean
    return GetSpellAbilityId == BlindMiss()
endfunction


Should be:

JASS:
function Trig_Blinding_Blow_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == BlindMiss()
endfunction


See if that fixes it.

Also, you never nulled the units, you need to add in the end of the trigger.

JASS:

set u = null
set t = null
set d =null


Also you never destroyed the effects, do this:

JASS:

call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", u, "chest"))

...

call DestroyEffect(AddSpecialEffect("Abilities\Spells\NightElf\Blink\BlinkTarget.mdl", GetUnitX(u), GetUnitY(u)))
 

Tom Jones

N/A
Reaction score
437
JASS:
function BlindBlow_lvl1 takes nothing returns boolean
    return GetUnitAbilityLevel(u, BlindingBlowRaw()) == 1
endfunction
u doesn't exits in that function. Change it to GetTriggerUnit(). Or better yet, remove the excessive code and add it directly as the evaluation of the if statement:
JASS:
    if GetUnitAbilityLevel(u,BlindingBlowRaw()) == 1 then
        set d = CreateUnit(GetOwningPlayer(u), 'h000', GetUnitX(u), GetUnitY(u),270)
        call UnitAddAbility(d, BlindMiss())
        call SetUnitAbilityLevel(d, BlindMiss(), 1)
        call IssueTargetOrder (d, "curse", t)
        set d = CreateUnit(GetOwningPlayer(u), 'h000', GetUnitX(u), GetUnitY(u),270)
        call UnitAddAbility(d, BlindMov())
        call SetUnitAbilityLevel(d, BlindMiss(), 1)
        call IssueTargetOrder (d, "bloodlust", u)   
    endif
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top