• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] TriggerSyncStart Failing?

Status
Not open for further replies.
Level 5
Joined
Sep 8, 2004
Messages
98
I've been working a ton on my map, basically making the entire map's code up to a 'standard' (half the stuff in it doesn't work, basically).

Today, I decided I'd test the map, just to see how much worked (and see if any bugs occured), but for some reason, the GetHost function is not working, at all:

JASS:
library GetHost

globals
    player host
endglobals

function GetHost 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 host = Player( GetStoredInteger(g, "Map", "Host" )-1)
    call FlushGameCache(g )
    set g = null
endfunction

endlibrary

I have tried running it at Map Initialization, and at 0.1 seconds afterward (using a timer), and both times it stops at TriggerSyncStart. I don't even know what this function does! :confused:

Also, is there an op limit for the map initialization? I've got so much variables and initialization stuff that has to be done, that I'm afraid I'm going to hit the OP limit (if it exists).
 
Yes, and it applies to any thread of Jass.

TriggerSyncStart - I don't think anybody knows what it does.

TriggerSyncReady - It pauses the game until the host responds.

SyncStoredInteger projects a value to the host and all players adopt the fastest projected value (theoretically that of the host, but not necessarily).

You may be interested in this (though as far as I've heard the function doesn't actually perform flawlessly, I'm more referencing it for the networking stuff).
 
Status
Not open for further replies.
Back
Top