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

Host detection

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
Host detection system

I need a host detection system to allow the host to choose the game mode
for the game make just make very very basic dialogue box, i got my own system that i will implant in

theres a code to begin the system

Code host
JASS:
function Trig_GetHost_Actions takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger(g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart()
    call SyncStoredInteger(g, "Map", "Host" )
    call TriggerSyncReady()
    set udg_Host = Player( GetStoredInteger(g, "Map", "Host" )-1)
    call FlushGameCache(g )
    set g = null
endfunction

//===========================================================================
function InitTrig_GetHost takes nothing returns nothing
    set gg_trg_GetHost = CreateTrigger(  )
    call TriggerAddAction( gg_trg_GetHost, function Trig_GetHost_Actions )
endfunction
 
Last edited:
Status
Not open for further replies.
Top