Frozenhelfir
set Gwypaas = Guhveepaws
- Reaction score
- 56
Just a question on the
function. How do I only have it detect for slots 1 and 11?
JASS:
call GetHost()
function. How do I only have it detect for slots 1 and 11?
call GetHost()
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 udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
call FlushGameCache( g )
set g = null
endfunction
Well, its in there but I can't find it. I know it works in game (just trust me on this) but sometimes it gets the wrong person. I want to narrow the slots down to the first slot on each team. I'll try to find it, but how would I limit the function to only specific slots?
EDIT: Found it -- looks like this
JASS: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 udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1) call FlushGameCache( g ) set g = null endfunction
I think I have to change the (getlocalplayer())+1) part but I just don't know what to change it to.
Just wondering... does anything ever take something or return something? All the functions I've seen take/return nothing.
How do I only have it detect for slots 1 and 11?