HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jass help? (units current order point)

08-21-2006, 10:40 PM#1
wing87
i made a script that when a units gets hit and has 1 mana (thats max) it casts avatar but when it does the unit stops his movement what functions can i use to get the current target of the triggering unit?

Collapse JASS:
function Trig_MeatMass_Avatar_Conditions takes nothing returns boolean
    if ( not ( R2I(GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit())) == 1 ) ) then
        return false
    endif
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u00K' ) ) then
        return false
    endif
    return true
endfunction

function Trig_MeatMass_Avatar_Actions takes nothing returns nothing
    local location orgPoint = what here?
    call IssueImmediateOrderBJ( GetTriggerUnit(), "avatar" )
    call TriggerSleepAction(0.50)
    call IssuePointOrderLocBJ( GetTriggerUnit(), "move", orgPoint)
endfunction

//===========================================================================
function InitTrig_MeatMass_Avatar takes nothing returns nothing
    set gg_trg_MeatMass_Avatar = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_MeatMass_Avatar, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_MeatMass_Avatar, Condition( function Trig_MeatMass_Avatar_Conditions ) )
    call TriggerAddAction( gg_trg_MeatMass_Avatar, function Trig_MeatMass_Avatar_Actions )
endfunction

Tnx!
08-21-2006, 11:05 PM#2
aquilla
I looked through the natives without luck. Best way I can think is to trigger this by maybe adding a spellbook to the unit with passives in it (spell immunity, + dmg, + armor, + hp) for example. If you choose this way, disabling the spellbook for each player would hide the spellbook icon but the passives will still work
08-21-2006, 11:07 PM#3
wing87
the thing is its a tw and the units that are sent has avatar and i wanted to activate it this way the units stops >.< so i need a way to get it moving again or a way to make avatar not stop the current order...