Author Topic: OnPlayerDisconnect  (Read 1143 times)

I posted about this in the past and people said there's no way to detect if the player disconnects, but i was thinking there could be an output event called "StartClientPing" which pings the client every 5 seconds or so, and there can be inputs like "OnPingReturned" and "OnPingMissed"(if the client disconnected and theres nothing to ping), have a system like that, but then the problem would be of knowing which "ping" to look for in the input event, which i guess you can make 6 different events sets for 6 ping systems to run at once (temporary fix because that can be spammy), it could work based on the player running it, so everyone can have 6 pings running at once, so it doesn't bug out when 2 people try to use ping1. This could be used to have the server react and reset when players leave, if you have a server where players interact with there own portion of the map, perhaps. Can this be done?

IIRC, you can detect the disconnection. You package the function GameConnection::onClientLeaveGame(%client);

Ok so how about this, you can package this as an addon to VCE, making it so i can detect if and when a specific name or BLID disconnected... hold on a minute... I think it would be possable to do the pinging thing with vanilla VCE! I'm going to try that give me 20 minutes!
« Last Edit: February 22, 2015, 11:42:15 PM by Yin Yang »

welcome back

ot:
this seems like a good idea.

Thanks, i need it for a build i'm working on, so it auto-resets. I needed this before and i just thought of a way it could be done, since there is apparently no way to directly detect a client disconnecting.
« Last Edit: February 22, 2015, 06:39:04 PM by Yin Yang »

IIRC, you can detect the disconnection. You package the function GameConnection::onClientLeaveGame(%client);

I have something like this (When a person connects it checks their ping, then calls a success function or a unsuccessful function of it works or not), I can implement it, but how would this be useful?

I have something like this (When a person connects it checks their ping, then calls a success function or a unsuccessful function of it works or not), I can implement it, but how would this be useful?
i need it for a build i'm working on, so it auto-resets. I needed this before and i just thought of a way it could be done, since there is apparently no way to directly detect a client disconnecting.

you can detect the disconnection
Not to sound stupid but i'm not sure what IIRC means, but I was just going off of what was said in my last topic like this years ago i remember people saying it is impossible.

Not to sound stupid but i'm not sure what IIRC means
"If I recall correctly"

Yes, you can detect when a client leaves.
Gameconnection::onDrop

actualy i think i found out how to do it with VCE, and i think it works, i just need someone to TEST it!

actualy i think i found out how to do it with VCE, and i think it works, i just need someone to TEST it!
Go for it
Launch a second blockland, join the server, and leave it

join the server, and leave it
I can't steam doesn't allow opening 2 instances of the same game and i don't have my BL code on hand.
« Last Edit: February 23, 2015, 12:46:48 AM by Yin Yang »

bump, i need this for my Blockland Tower gamemode