user count change
Posted: 20 Apr 2011, 20:15
Hey all--
I am trying to get server negotiations set up after a user joins a room.
The negotiation is really simple, and I have it working for 3 other protocols (I run the same set of calls for Bluetooth, Unity Networking, and Smart Fox)-- that section of the code works just fine.
However, I am having difficulty getting the negotiations to work-- I need the negotiations to run whenever a player joins a room, on both my 'client' (a person who joins a room) and my 'server' (the room creator).
The problem is that I can't get the events dispatched from a user to join a room run.
Here are the 3 that I have tried:
The problem is that my negotiations are not being run on the 'client' (person who joined the room). The seem to work just fine on the 'server' (person who created the room). I've checked the documentation, and it leaves the actual functioning of the above dispatched events very ambiguous.
Thanks for you help!
I am trying to get server negotiations set up after a user joins a room.
The negotiation is really simple, and I have it working for 3 other protocols (I run the same set of calls for Bluetooth, Unity Networking, and Smart Fox)-- that section of the code works just fine.
However, I am having difficulty getting the negotiations to work-- I need the negotiations to run whenever a player joins a room, on both my 'client' (a person who joins a room) and my 'server' (the room creator).
The problem is that I can't get the events dispatched from a user to join a room run.
Here are the 3 that I have tried:
Code: Select all
smartFox.AddEventListener(SFSEvent.USER_ENTER_ROOM, HandleCountChange);
smartFox.AddEventListener(SFSEvent.ROOM_JOIN, HandleCountChange);
smartFox.AddEventListener(SFSEvent.USER_COUNT_CHANGE, HandleCountChange);
Thanks for you help!