PDA

View Full Version : plugins for game room?



vfang
07-06-2005, 08:55 AM
I'm just starting out with this stuff, but I can't seem to get a plugin to work with a gameroom -- I ended up trying to just use the basic tic tac toe example and put in an existing plugin ("AbilitiesShowcasePlugin") but this didn't seem to work. Any help?

-vicky

function ok() {
//Build the game room object, then send it to ElectroServerAS for it to be created.
var gameRoomOb = new Object();
gameRoomOb.description = description.text;
gameRoomOb.roomName = roomName.text;
gameRoomOb.zone = "Lobby Area";
var pluginOb:Object = new Object();
pluginOb.name = "AbilitiesShowcasePlugin";
gameRoomOb.plugins = [pluginOb];
gameRoomOb.password = pass.text;
gameRoomOb.attributes = new Object();
gameRoomOb.attributes.allowSpectators = allowSpectators;
gameRoomOb.attributes.numPlayers = 2;
gameRoomOb.attributes.playersArrived = 1;
_parent.es.createGameRoom(gameRoomOb);
_parent.joiningGame = true;
gotoAndStop(1);

}

webgeek
07-07-2005, 04:58 AM
What happens when you use that code? Do you get an error message? Thanks!

vfang
07-07-2005, 06:59 AM
No error, it just never calls the roomJoined event. If I take the plugin code out, it works fine.

jobem
07-07-2005, 06:30 PM
Hi,

Does the server console show an error?

vfang
07-07-2005, 08:39 PM
I'm pretty sure it doesn't, but I'll doublecheck on it tonight...

vfang
07-08-2005, 07:01 PM
yeah, I don't get an error in the server console either.

jobem
07-09-2005, 06:31 PM
Hi,

Its hard to guess what's causing that issue. From the sound of what you're doing it should work. Luckily though a working example is available in the latest version of the server. So you probably already have that installed. If you open the Examples html page (installed on your computer) and scroll to the bottom, you'll see Abilities Showcase Plug-in. There is a link to a FLA file that uses it. Check the Code frame label of that FLA in the joinRoom function. You'll see how that plug-in is created and associated with a room successfully.

vfang
07-10-2005, 03:58 AM
Is there an example of createGameRoom that uses a plugin?