i'm making a card game.The player can still auto playing on a room when offline, so i working on a custom list player, not a default user variable.
My game have a rules, when player out and number of players on a room < minNumberOnRoom, i need to check all another room to balance player rooms. So i need fire a event from room to my zone, and i dont know how to comunication beetween room and zone
I user sfs2x version
how to comunication beetween room and zone
Re: how to comunication beetween room and zone
Hi,
all Extensions have a method that looks like this:
which allows to send messages between extensions.
For example from the Zone you can do the following:
You can also do the other way around:
Cheers
all Extensions have a method that looks like this:
Code: Select all
Object handleInternalMessage(String cmdName, Object params)which allows to send messages between extensions.
For example from the Zone you can do the following:
Code: Select all
var someRoom = zone.getRoomByName("SomeRoom");
someRoom.getExtension().handleInternalMessage("cmd", params);You can also do the other way around:
Code: Select all
var myZone = someRoom.getZone();
myZone.getExtension().handleInternalMessage("cmd", params);
Cheers
Re: how to comunication beetween room and zone
I solved it by your answer
Thank for your help. Have good day sir
Thank for your help. Have good day sir