Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Is there a GUI Host Check?

Discussion in 'Triggers & Scripts' started by mammoth28, Oct 22, 2007.

  1. mammoth28

    mammoth28

    Joined:
    Sep 4, 2007
    Messages:
    23
    Resources:
    1
    Maps:
    1
    Resources:
    1
    As usual, I try to do my research first before asking these questions. And by the way the search engine for this site is not so good, maybe some of you can write a jass web search engine...Lol. It pulls up pages of crap thats not even related. (It seems its a word based search rather than whole phrases or combo words like "Host Check").

    Anyways, I searched for a way to switch the host to another player, if the host dies or is disconnected. What I did find was all Jass stuff, in which I'm just starting to look at Jass. I tried to accomplish what I thought they were doing thru triggers, but no results.

    I figured I would ask if anyone has a Host check Trigger using varibles thats GUI already made before I spend to much more time on this. If not, then I will post what I have so far, and maybe you kind people might help me figure it out. Your help is greatly appriciated. :infl_thumbs_up:
     
  2. edge[d1]

    edge[d1]

    Joined:
    Mar 2, 2006
    Messages:
    306
    Resources:
    1
    Icons:
    1
    Resources:
    1
    gui offers no such things. but you can find out who the game host is (see here) and put that into a gui variable HostPlayer (which you created) with this custom script line set udg_HostPlayer = GetHost(). then you can use that variable to ask the host about game options...

    on a side note, the function does not always return the guy who created the game (never returned me :sad:) - it quite often returns the guy with the fastest machine. it is because of blizzards server-switching technology... hence - gethost function is imperfect but we don't have a better one. if it is not good enough for you, go with the first human player from the top...
     
  3. ragingspeedhorn

    ragingspeedhorn

    Joined:
    Apr 30, 2005
    Messages:
    6,521
    Resources:
    14
    Icons:
    5
    Maps:
    7
    Tutorials:
    2
    Resources:
    14
    gethost is very exact, but not 100% yes. You have to have a really shitty computer/connection or be running a ton of shit when in Wc3 not to be recognised as the host :)

    ..Or some other person to be extremely superior.

    And the tutorial is pretty straightforward, mammoth28, it should be easy to follow and then if the host leaves assign his previlidges to some other player.