SwitchPlayer and SwitchSpectator for Game Host

Post here your suggestions for new possible features in SmartFoxServer.

Moderators: Lapo, Bax

Post Reply
Ross Przybylski
Posts: 70
Joined: 24 Jan 2008, 03:56
Contact:

SwitchPlayer and SwitchSpectator for Game Host

Post by Ross Przybylski »

I was reading through the Flash AS3 API today to find the functions needed to switch players to spectators and vice-versa. I realized, however, that it's handled as a the SmartFox client method rather than a user object function, which I feel is a bit limited. In my game, I want to give the game host control over who can be spectator or player. I should be able to work around this sending a game object to direct clients to switch themselves, but it would be nice to have the option to supply an ID of a user you'd like to switch as a parameter of this function so the hosting player could switch anyone they choose.

Edit: Along those same lines, it would also be helpful to have a built-in boot function so that a game host could kick a player out of their game room. I realize this can be accomplished with Extensions, but since it's such a useful tool that it would be beneficial to have it directly within the Flash API.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

In my game, I want to give the game host control over who can be spectator or player.
You can do that from server side, which btw is the only safe place to do it.
Edit: Along those same lines, it would also be helpful to have a built-in boot function so that a game host could kick a player out of their game room. I realize this can be accomplished with Extensions, but since it's such a useful tool that it would be beneficial to have it directly within the Flash API
You can do that from client side if the User is recognized as moderator, take a look at the docs. Personally I would anyways implement both features from server side.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply