System GetDelay

Azlier

Old World Ghost
Reaction score
461
I would also remove the unit. Combined with yours, it's good.
 

Azlier

Old World Ghost
Reaction score
461
So be it!

"ABRACADABRA!"

JASS:
library GetHost initializer Init

globals
    private unit U
    private player Host = null
endglobals

constant function GetHost takes nothing returns player
    return Host
endfunction

private function Click takes nothing returns boolean
    if Host == null then
        set Host = GetTriggerPlayer()
        call RemoveUnit(U)
        set U = null
    endif
    return false
endfunction

private function Init takes nothing returns nothing
    local trigger t = CreateTrigger()
    set U = CreateUnit(Player(15), 'hfoo', 10000, 10000, 270)
    call PauseUnit(U, true)
    call TriggerRegisterUnitEvent(t, U, EVENT_UNIT_SELECTED)
    call TriggerAddCondition(t, Condition(function Click))
    call SelectUnit(U, true)
endfunction

endlibrary


Now, does it compile? Does it... work? I don't know.
 

Jesus4Lyf

Good Idea™
Reaction score
397
JASS:
private function Click takes nothing returns boolean
    if Host == null then
        set Host = GetTriggerPlayer()
    endif
    call RemoveUnit(U)
    set U = null
    return false
endfunction

-->
JASS:
private function Click takes nothing returns boolean
    if Host == null then
        set Host = GetTriggerPlayer()
        call RemoveUnit(U)
        set U = null
    endif
    return false
endfunction

Now add an event for when player leaves, to DO IT ALL AGAIN! MUHAUHAHAHahaha....

Edit: Lol, why the hell isn't this in its own thread? Go submit it or something? XD
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Maybe this post will be irrelevant, maybe not.

When games are hosted by bots and i join them, if my war3 is minimized during the loading time, the bot consider me as admin.
Maybe it's the same with GetDelay, i can't test it.
I don't have a good connection btw i'm only on 64 ko/s.

Also i can't say if the fact that i've a dual core processor does matter or not.

Hmm or the bot consider the one who has finished downloading first as the admin ?
That would make more sense since i tend to load a map faster when my wc3 is minimized.

Sorry for this OFF-TOPIC, if someone could be enough nice to answer me.

EDIT :

I think i confused the admin considered by the bot, and the host considered by the custom GetHost function, you know the Triggersync stuff + gamecache, but it's still valid, could be the same here.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top