• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

GetConstructingStructure question

Status
Not open for further replies.
Level 7
Joined
Feb 14, 2008
Messages
289
Would this apply to the last constructing structure?

Here is my code
Code:
function Portal_Ability_Actions takes nothing returns nothing
        local real ax
        local real bx
        local real ay
        local real by
        local unit dummy
        local unit caster
        local unit a
        local unit b
    if(GetSpellAbilityId()=='A02D')then
        set ax = GetSpellTargetX()
        set ay = GetSpellTargetY()
        set bx = GetUnitX(GetTriggerUnit())
        set by = GetUnitY(GetTriggerUnit())
        set dummy = CreateUnit(GetTriggerPlayer, 'u001', ax, ay, 270)
        call IssuePointOrderById(dummy, 'h003', ax, ay)
        set a = GetConstructingStructure()
        set dummy = CreateUnit(GetTriggerPlayer, 'u001', bx, by, 270)
        call IssuePointOrderById(dummy, 'h003', bx, by)
        set b = GetConstructingStructure()
    else
        DoNothing()
    endif
    endfunction
 
Status
Not open for further replies.
Top