• 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.

Will this work?

Status
Not open for further replies.
Level 11
Joined
Jun 30, 2008
Messages
580
JASS:
library test initializer Init

function Actions takes nothing returns nothing
    local integer test = 'Aloc'
    if GetLocalPlayer() != GetOwningPlayer(gg_unit_Hpal_0000) then
        set test = 0
    endif
    call UnitAddAbility(gg_unit_Hpal_0001, test)
endfunction

//===========================================================================
function Init takes nothing returns nothing
    local trigger t = CreateTrigger(  )
    call TriggerAddAction( t, function Actions )
endfunction

endlibrary

the ID is for locust

Was wondering if this could work? or would it Desync?
 
This desyncs afaik, because this adds locust only for a single player. Either it desyncs instantly (what I think because UnitAddAbility(unit, 0) simply doesn't work and does nothing) or it desyncs as soon as the unit without locust is clicked/attacked/...
In this case you tell the computer to add the ability with id "0/'Aloc'". However, since 0 does nothing, nothing happens and no ability is added, so there is a missing ability. This trick works for example for effects because effects without a model are created too.
 
Status
Not open for further replies.
Top