Hi,
Im currently having 2 different extension for a game.
1 main room lobby and zone is handled by a java extension ,
while 1 game room is handled by a as/js based extension.
What i need now is communication between the 2 extension.
I've think of using sending public message to the main room, and awaits for the zone extension to send back an public message to game room extension..
is it possible?
Anyone can shade some sample codes i can use?
thank you so much in advanced...
room to room talk
Hello,
you can directly communicate with the zone level extension from the Game Room, but not vice versa, and the communication is same as that of you do with the room level extension from the Game Room. No need of sending any private messages.
If you talk about the chat between users in two different rooms, private message server better, as it needs only the user id, no need of any room id and all you need is the user id you want to chat with.
sritej.
Code: Select all
I've think of using sending public message to the main room, and awaits for the zone extension to send back an public message to game room extension..
is it possible?
you can directly communicate with the zone level extension from the Game Room, but not vice versa, and the communication is same as that of you do with the room level extension from the Game Room. No need of sending any private messages.
If you talk about the chat between users in two different rooms, private message server better, as it needs only the user id, no need of any room id and all you need is the user id you want to chat with.
sritej.
how?
Hi Sritej,
How do i do that?
I tried _server.getCurrentZone().myfunction(param)... it failed
i even tried _server.myfunction(param)... missing function 2...
How do i do that?
I tried _server.getCurrentZone().myfunction(param)... it failed
i even tried _server.myfunction(param)... missing function 2...
Hello
Please follow the action script api if you use action script extension files.
http://www.smartfoxserver.com/docs/docP ... /index.htm
_server.getCurrentZone() Returns a zone object through which u cannaot make a call of your own function, rather only the functions from zone class can be called.
Use smartFoxObject.sendXtMessage() to send request to the extension that you are using either the room extension or the zone extension.
Use smartFoxObject.sendPrivateMessage(message, UserId) to send a private message to the user. These both methods can be used from the client side application.
Code: Select all
I tried _server.getCurrentZone().myfunction(param)
Please follow the action script api if you use action script extension files.
http://www.smartfoxserver.com/docs/docP ... /index.htm
_server.getCurrentZone() Returns a zone object through which u cannaot make a call of your own function, rather only the functions from zone class can be called.
Use smartFoxObject.sendXtMessage() to send request to the extension that you are using either the room extension or the zone extension.
Use smartFoxObject.sendPrivateMessage(message, UserId) to send a private message to the user. These both methods can be used from the client side application.
server to server
by the way, im looking for extension to extension communication.
not flash to extension.
That 1, i know.
not flash to extension.
That 1, i know.
ok
please follow this post..
viewtopic.php?t=6151
you were mentioning about private messages.. so , happend to give these methods to you. any ways, extension to extesnion communication can be done like this also i guess, but with proper care..
Thank you
please follow this post..
viewtopic.php?t=6151
you were mentioning about private messages.. so , happend to give these methods to you. any ways, extension to extesnion communication can be done like this also i guess, but with proper care..
Thank you
no, not that way...
Thats initiating new instance of the sub classes to handle the request...
What i need is reusing existing classes and calling those function within the zone from the room extension...
What i need is reusing existing classes and calling those function within the zone from the room extension...
i found something :)
i found this in the doc:
http://www.smartfoxserver.com/docs/docP ... bility.htm
yes, thats probably what i needed
http://www.smartfoxserver.com/docs/docP ... bility.htm
yes, thats probably what i needed
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 13 guests