Use the socket.on disconnect function to broadcast it.
I see how to do it, but I have no idea what to enter in after that.
example_server.js
socket.on (disconnect) {
??
}
Develop games in your browser. Powerful, performant & highly capable.
I got everything working and set it up properly, but now I'm wondering how to get rid of characters/avatars/people (The people you play as) when you leave. Because they just stay there and it's quite annoying. Any suggestions?