• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

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