Home   Help Search Login Register  

Author Topic: onPlayerDisconnected (ACCEPTED)  (Read 2717 times)

0 Members and 1 Guest are viewing this topic.

Offline dr. seltsam

  • Members
  • *
onPlayerDisconnected (ACCEPTED)
« on: 21 Oct 2007, 23:17:25 »
In the last weeks i played many online coop-missions. Some mapmakers told me about problems that can occur in their mission, if a player disconnects during a running game. Maybe their AI is giving confusing orders then, or the other players have problems to meet the objectives and finish the mission.
 :(

I developed a script set, that is able to detect a disconnected player. It works best for coop-missions with disabled AI by default, because it expects every to the script passed unit as human. It will execute the onPlayerDisconnected script for every disconnected player once, synchronized, on the server and all the clients that are running the mission. It cannot detect disconnection immediatly, but at least it detects after a certain time period.
 :)

I know, there are methods to detect disconnection with the locality to the server. But if the players are grouped together, this method will not have success. I am using a global value sended via publicvariable to the server, like a ping. The server expects that value to be present after a certain time period. If not, it will count the player as disconnected and will execute onPlayerDisconnected for the related unit.

I would like to hear your opinion, and will take suggestions or answer questions here.


Credits for ideas, helping and testing to:
Jumper8
Mantel

Edit: don�t be confused about the readme...  Mad Max is equal to dr. seltsam

Get onPlayerDisconnected v0.922
« Last Edit: 04 Jun 2008, 21:37:12 by Mandoble »

Offline dr. seltsam

  • Members
  • *
Re: onPlayerDisconnected
« Reply #1 on: 04 Jun 2008, 20:33:21 »
And here is the update for onPlayerDisconnected:  :whistle:  :whistle:

onPlayerDisconnected   Ver. 0.922

Changelog:
1. changed the script start timing a bit, to avoid problems with slower computers

The script was tested with a dedicated server and within a hosted game. I could not find any problems. If you can give me feedback, or have questions or suggestions, ask me here, or send me an email to the adress you will find in the readme file.
 :) :) :)
« Last Edit: 04 Jun 2008, 21:35:37 by Mandoble »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: onPlayerDisconnected (ACCEPTED)
« Reply #2 on: 04 Jun 2008, 21:44:44 »
Accepted, while I have no way to test it.