• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Fixing this to work properly with Battle.net

Status
Not open for further replies.
Level 12
Joined
Mar 10, 2008
Messages
869
I think that "desyncing" is the problem I have.

JASS:
function Trig_Jumper_Actions takes nothing returns nothing
    local unit u=GetTriggerUnit()
    local real x=GetUnitX(u)
    local real y=GetUnitY(u)
    if(GetUnitFlyHeight(u)<1)then
        set udg_LastTerrain[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))+1] = GetTerrainType(x,y)
        call SetUnitFlyHeight(u, 500.00, 500.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 500.00, 400.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 500.00, 300.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 500.00, 200.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 500.00, 100.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 2.00, 100.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 2.00, 200.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 2.00, 300.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 2.00, 400.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 2.00, 500.00 )
        call TriggerSleepAction( 0.05 )
        call SetUnitFlyHeight(u, 0, 500.00 )
    endif
    set u=null
endfunction
How can I make this trigger work properly on Battle.net, but keep its fly height "jump" curvature?
 
Level 9
Joined
Nov 28, 2008
Messages
704
native SetUnitFlyHeight takes unit whichUnit, real newHeight, real rate returns nothing


Are you sure you're using it right? What is the intention of this trigger?

You also use no GetLocalPlayer() making desync impossible.

call TriggerSleepAction( 0.05 ) also does not work. TSA at a minimum waits 0.3 seconds or so. Use timers.

Also, dont use TSA, use PolledWait(). Its shorter to type.
 
Level 12
Joined
Mar 10, 2008
Messages
869
images
 
Status
Not open for further replies.
Top