| 12-13-2009, 08:42 PM | #1 |
I had been using this function in my map to determine the game host. It's pretty accurate, but now with all the ghosts out there hosting maps, it's a problem. JASS:call FlushGameCache(InitGameCache("gamehost.w3v")) set udg_gamehost = InitGameCache("gamehost.w3v") call StoreInteger ( udg_gamehost, "host", "host", GetPlayerId ( GetLocalPlayer () ) ) call TriggerSyncStart () call SyncStoredInteger ( udg_gamehost, "host", "host" ) call TriggerSyncReady () set udg_Host = GetStoredInteger ( udg_gamehost, "host", "host" ) call FlushStoredMission(udg_gamehost,"host") How could I be able to tell if it is a Ghost running the map so I can just set the Host to Player(0)? Any ideas? |
| 12-13-2009, 09:26 PM | #2 |
Use HCL for GHost imo |
| 12-13-2009, 10:22 PM | #3 |
That doesn't help me. I just need to know if a bot is hosting. |
| 12-13-2009, 11:42 PM | #4 |
Good luck with that ... |
| 12-14-2009, 12:33 AM | #5 |
Well, I have noticed that every host seems to list shortest and longest load times within 1 second. Maybe I'll just use that to register the speaking person as the host :) Edit: omg, the chat event doesn't even register |
| 12-14-2009, 07:33 AM | #6 |
waiting for him performing some special action (press some key, type some string, use dialog) --> if done within the first x sec it's a human player else it's a bot not the nicest way, but works |
| 12-14-2009, 07:56 AM | #7 |
Clear selection. SelectUnit StartTimer Register selection event First player to select unit is host (may be) |
| 12-14-2009, 11:58 AM | #8 |
Nah, The host is allways the bot. The actual "playerhost" (the owner, who created the game) doesn´t necesserly got the lowest ping, since his bot is running on a root server, more likely then on his own pc. Imo best way would be allways let the first player choose, if there´s no hcl command. When a ghost owner wants to play another slot, he can just use hcl. |
