• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help fixing my fail jass?

Status
Not open for further replies.
Level 4
Joined
Dec 10, 2008
Messages
25
Hello hiveworkshop. I'm new to JASS and I ran into a problem. just need a few pointers.
JASS:
function Trig_Counter_Helix_Func002C takes nothing returns boolean
    if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B000') == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Counter_Helix_Conditions takes nothing returns boolean
    if ( not Trig_Counter_Helix_Func002C() ) then
        return false
    endif
    return true
endfunction

function Trig_Counter_Helix_Func001Func002002003001 takes nothing returns boolean
    return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction

function Trig_Counter_Helix_Func001Func002002003002 takes nothing returns boolean
    return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

function Trig_Counter_Helix_Func001Func002002003 takes nothing returns boolean
    return GetBooleanAnd( Trig_Counter_Helix_Func001Func002002003001(), Trig_Counter_Helix_Func001Func002002003002() )
endfunction

function Trig_Counter_Helix_Func001Func003A takes nothing returns nothing
    call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
    call ConditionalTriggerExecute( gg_trg_Destroy_FX )
    call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 + ( 25.00 * I2R(GetUnitAbilityLevelSwapped('A000', GetTriggerUnit())) ) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction

function Trig_Counter_Helix_Func001C takes nothing returns boolean
    if ( not ( GetRandomInt(1, 100) <= 15 ) ) then
        return false
    endif
    return true
endfunction

function Trig_Counter_Helix_Actions takes nothing returns nothing
    if ( Trig_Counter_Helix_Func001C() ) then
        set udg_Temp_Point = GetUnitLoc(GetTriggerUnit())
        set udg_Temp_Group = GetUnitsInRangeOfLocMatching(200.00, udg_Temp_Point, Condition(function Trig_Counter_Helix_Func001Func002002003))
        call ForGroupBJ( udg_Temp_Group, function Trig_Counter_Helix_Func001Func003A )
        call SetUnitAnimation( GetTriggerUnit(), "spin" )
        call RemoveLocation(udg_Temp_Point)
        set udg_Temp_Point = null
        call DestroyGroup(udg_Temp_Group)
        set udg_Temp_Group = null
        call DisableTrigger( GetTriggeringTrigger() )
        call TriggerSleepAction( 0.25 )
        call EnableTrigger( GetTriggeringTrigger() )
        call SetUnitAnimation( GetTriggerUnit(), "stand" )
    else
    endif
endfunction

//===========================================================================
function InitTrig_Counter_Helix takes nothing returns nothing
    set gg_trg_Counter_Helix = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Counter_Helix, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_Counter_Helix, Condition( function Trig_Counter_Helix_Conditions ) )
    call TriggerAddAction( gg_trg_Counter_Helix, function Trig_Counter_Helix_Actions )
endfunction

um. i kinda just made a GUI and convert it. :\ im super newb sorry sorry D:
 
Level 2
Joined
Jul 17, 2009
Messages
9
I don't know JASS, but if you haven't closed WorldEditor since converting it, just press Ctrl + Z, or the Undo button, it'll fix it.
 
Status
Not open for further replies.
Top