1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Make Player Disconnect

Discussion in 'World Editor Help Zone' started by defskull, Mar 5, 2011.

  1. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    I'm trying to create a -kick system over here and I'd like my system to purposely make that player disconnect
    I don't want that Force Player Defeat action as we have choices like Continue Game or Exit something like that
    The script GetLocalPlayer() can cause the player to disconnect, is it ?
    Show me the correct usage in trigger including Event and Actions, no need Conditions
     
  2. XPQJ

    XPQJ

    Joined:
    Mar 16, 2009
    Messages:
    336
    Resources:
    2
    Maps:
    2
    Resources:
    2
    there are many votekick systems in the spells section, might be worth looking at a few of them as a resource for your system.
     
  3. cboy123

    cboy123

    Joined:
    Aug 1, 2009
    Messages:
    663
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Force Player Defeat has no Continue Game or Exit Tag
    Only Victory can do the Continue Game or Exit
    And besides. Player Disconnect is can be apply when the other player has no internet connection.

    =Offtopic=
    Player 1: -kick Blue
    Player 2: =You are disconnected=

    Wow! I think -kick can make players lose their connection. XD Hope someone help skull cause I think I might need this.
     
  4. Section

    Section

    Joined:
    Jul 23, 2008
    Messages:
    97
    Resources:
    0
    Resources:
    0
    just give the selected player defeat condition...
     
  5. WhitePhoenix

    WhitePhoenix

    Joined:
    May 3, 2007
    Messages:
    197
    Resources:
    0
    Resources:
    0
    Run a local player block for the desired player, try to manipulate one of the players agents, all hell breaks loose.

    Make sure you don't catch more then just the desired player in the local player block though. I haven't coded Warcraft 3 in a while but I remember this being a way to achieve your desired effect.

    I don't see any reliable way to do it via GUI, but the JASS code my look something like this:

    Code (vJASS):

    If(GetLocalPlayer() == #) then //Can't remember if LocalPlayer returns boolean or an actual Player, change occurdingly
     call SetUnitX(_reservedUnit[#],0)
    endif
     


    The point is your moving a players unit locally, a unit of course not supporting such an operation, thus causing a bit of kerfuffle.
     
  6. x3GlikE

    x3GlikE

    Joined:
    Jul 7, 2010
    Messages:
    658
    Resources:
    0
    Resources:
    0
    Just make screen errors?
     
  7. WaterKnight

    WaterKnight

    Joined:
    Aug 18, 2009
    Messages:
    4,035
    Resources:
    5
    Maps:
    1
    Tutorials:
    4
    Resources:
    5
    The defeat/victory dialog is from blizzard.j. So this could be left out.

    Code (vJASS):
    if (GetLocalPlayer() == <player>) then
        call EndGame(<showScoreScreen>)
    endif


    I do not like the idea of really disconnecting the game through unexpected asyncness as I think this might end the game for a part of other players or all, too.