code problem

Tar-Quaeron

New Member
Reaction score
0
Could anybody tell me what is wrong with this?

JASS:
function VenomSplash takes nothing returns nothing
    call CreateNUnitsAtLocFacingLocBJ(1, 'h00Z', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetEnumUnit()), GetUnitLoc(GetEnumUnit()))
    call UnitApplyTimedLifeBJ(1.00, 'BTLF', GetLastCreatedUnit())
    call IssueTargetOrderBJ(GetLastCreatedUnit(), "attack", GetEnumUnit())
endfunction 

function Ennemy takes nothing returns boolean
//Apparently there is a problem with this line
    return ( IsUnitEnnemy(GetFilterUnit(), GetOwningPlayer(GetAttacker())) == true )
endfunction 
//and this line
    
function Murloc_Venom_Actions takes nothing returns nothing
    local unit VenomAff 
    if GetUnitTypeId(GetAttacker()) == 'o00W' then
        set VenomAff = GetAttackedUnitBJ()
        call SetUnitMoveSpeed(VenomAff, 0.925 * GetUnitMoveSpeed(VenomAff))
        call ForGroupBJ(GetUnitsInRangeOfLocMatching(90.00, GetUnitLoc(VenomAff), Condition(function Ennemy)), function VenomSplash)  
        call TriggerSleepAction(6)
        call SetUnitMoveSpeed(VenomAff, 1.081 * GetUnitMoveSpeed(VenomAff))
    endif
    if GetUnitTypeId(GetAttacker()) == 'o00X' then
        set VenomAff = GetAttackedUnitBJ()
        call SetUnitMoveSpeed(VenomAff, 0.85 * GetUnitMoveSpeed(VenomAff))
        call TriggerSleepAction(6)
        call SetUnitMoveSpeed(VenomAff, 1.176 * GetUnitMoveSpeed(VenomAff))
    endif
    if GetUnitTypeId(GetAttacker()) == 'o00Y' then
        set VenomAff = GetAttackedUnitBJ()
        call SetUnitMoveSpeed(VenomAff, 0.775 * GetUnitMoveSpeed(VenomAff))
        call TriggerSleepAction(6)
        call SetUnitMoveSpeed(VenomAff, 1.2903 * GetUnitMoveSpeed(VenomAff))
    endif
endfunction

//===========================================================================
function InitTrig_Murloc_Venom takes nothing returns nothing
    set gg_trg_Murloc_Venom = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Murloc_Venom, EVENT_PLAYER_UNIT_ATTACKED)
    call TriggerAddAction(gg_trg_Murloc_Venom, function Murloc_Venom_Actions)
endfunction


Thx so much,
 

Tar-Quaeron

New Member
Reaction score
0
Never mind. I'm really sorry. By looking at the
JASS:
representation I realized that it's not IsUnitEnnemy is not a function apparently, but IsUnitEnemy. I thought enemy was spelled with two ns (as in French I'm pretty sure). I really apologize for taking up space for no reason.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top