• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Quick Map Test - Multiplayer

Status
Not open for further replies.
Hello! No, this isn't to advertise a map. I need someone to test whether or not this disconnects another player. It is just a simple code that I need to be tested for multiplayer just for curiosity's sake.
JASS:
function LP_Act takes nothing returns nothing
    local texttag x = null
    call BJDebugMsg("Null Handle Id: "+I2S(GetHandleId(x)))
    if GetLocalPlayer() == Player(0) then
        set x = CreateTextTag()
    endif
    call BJDebugMsg("New Handle Id: "+I2S(GetHandleId(x)))
    call BJDebugMsg("Did anyone disconnect?")
    call BJDebugMsg("Thanks for testing!")
endfunction

//===========================================================================
function InitTrig_LocalPlayer takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterTimerEvent(t,3,false)
    call TriggerAddAction(t,function LP_Act)
endfunction

Basically just test the map attached below with a friend or something. If they don't get disconnected, success. If they do, then it is still fine.

Yeah, don't create handles in GetLocalPlayer() blocks yada yada... Text tags aren't allocated like normal handles, I just want to see if this disconnects or not. =)

Thanks to any who test it, +rep to any who help. Please be sure that you post the results of the messages for both players if you can.
 

Attachments

  • testlpx.w3m
    16.3 KB · Views: 39
Level 19
Joined
Feb 4, 2009
Messages
1,313
you should instead create the text tag for all players, hide it and show it for the local player only

I tested it with 2 people with multiboards and the non-host got disconnected
then I created 12 multiboards for all players and hid all for every player
then I showed multiboard 1 to player 1, multiboard 2 to player 2, etc.

(example http://www.hiveworkshop.com/forums/...0-1-a-159453/?prev=d=list&r=20&u=D4RK_G4ND4LF )

I only tested this special example so there might occur disconnects after a few hours but blizzard uses local players like that in many functions so I think it is stable (they say in comments it will work as long as there is no "net traffic" [which can't be known unless you test it that way])
just check the blizzard jass functions which handle text tags and see for yourself

if you still want to test it in multiplayer or want something else just ignore this post
 
you should instead create the text tag for all players, hide it and show it for the local player only

Yeah, I still want a test though. =) Multiboards are allocated like normal handles, they disconnect when created locally. Yeah, it isn't useful to create text tags in local player blocks since you can modify the invisibility/display or whatever, but this is just a test for knowledge's sake. =D

But thanks for the response. :thumbs_up:
 
Status
Not open for further replies.
Top