HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Partially works

01-23-2007, 08:31 PM#1
Joker
Collapse JASS:
function Trig_Follow_Commander_Conditions takes nothing returns boolean
    return GetUnitTypeId(GetOrderedUnit()) == 'U00G'
endfunction

function Trig_Follow_Commander_Func002A takes nothing returns nothing
    call IssuePointOrder( GetEnumUnit(), "move", GetOrderPointX(), GetOrderPointY() )
endfunction

function Trig_Follow_Commander_Actions takes nothing returns nothing
    call ForGroup( GetUnitsOfTypeIdAll('U00H'), function Trig_Follow_Commander_Func002A )
endfunction

//===========================================================================
function InitTrig_Follow_Commander takes nothing returns nothing
    set gg_trg_Follow_Commander = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Follow_Commander, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
    call TriggerAddCondition( gg_trg_Follow_Commander, Condition( function Trig_Follow_Commander_Conditions ) )
    call TriggerAddAction( gg_trg_Follow_Commander, function Trig_Follow_Commander_Actions )
endfunction
I have 3 'U00H', but the trigger only works for 1 of them. Am i doing something wrong?
01-25-2007, 08:49 PM#2
Joker
Bump..
01-27-2007, 10:35 PM#3
Joker
someone tell me why it only works for 1 unit and not all 3 plz...
01-27-2007, 11:12 PM#4
Anopob
Tell what is it suppose to do and what works/doesn't work.
01-27-2007, 11:18 PM#5
Joker
You should be easily able to tell what it does on the trigger...and what doesnt work is all written on my 1st post.
01-27-2007, 11:40 PM#6
Anopob
Collapse JASS:
function Trig_Follow_Commander_Conditions takes nothing returns boolean
    return GetUnitTypeId(GetOrderedUnit()) == 'U00G'
endfunction

function Trig_Follow_Commander_Func002A takes nothing returns nothing
    call IssuePointOrder( GetEnumUnit(), "move", GetOrderPointX(), GetOrderPointY() )
endfunction

function Trig_Follow_Commander_Actions takes nothing returns nothing
    call ForGroup( GetUnitsOfTypeIdAll('U00H'), function Trig_Follow_Commander_Func002A )
endfunction

//===========================================================================
function InitTrig_Follow_Commander takes nothing returns nothing
    set gg_trg_Follow_Commander = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Follow_Commander, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
    call TriggerAddCondition( gg_trg_Follow_Commander, Condition( function Trig_Follow_Commander_Conditions ) )
    call TriggerAddAction( gg_trg_Follow_Commander, function Trig_Follow_Commander_Actions )
endfunction
Are they suppose to be different?
01-28-2007, 12:01 AM#7
Joker
yeah, ones the actual hero that does the order, and the 'U00H' is the follower that suppose to do everything that the hero does
01-28-2007, 01:30 PM#8
shadow1500
There's obviously something else at work here. It could be that the guard units are not able to move, for example. Posting the trigger isn't much help.