I searched for a topic like this but I couldn't find anything so, I'm posting a new one !
I have being building a MMO game with SFS2 with Flash (As3) and know I'm currently almost done. But there's still a question that I could not figure it out (Sorry, I'm really noob), How do I display the number of player in some room to the other users?
I have 4 rooms in 1 zone and I would like to display in the lobby the number of user in each room.
If anyone can give me the answer or at least some direction I'd be really happy.
Displaying number of users in the Rooms
-
solveProblems()
- Posts: 8
- Joined: 21 Jun 2011, 12:39
- Location: Brazil
Displaying number of users in the Rooms
if (problemSolved == false)
{
stress += 10
}
else
{
celebrate(stress)
}
{
stress += 10
}
else
{
celebrate(stress)
}
-
solveProblems()
- Posts: 8
- Joined: 21 Jun 2011, 12:39
- Location: Brazil
Just for you guys to know
I tried this http://www.smartfoxserver.com/docs/docP ... ountChange
And I got this error
#1119: Access of possibly undefined property onUserCountChange through a reference with static type Class.
I tried this http://www.smartfoxserver.com/docs/docP ... ountChange
And I got this error
#1119: Access of possibly undefined property onUserCountChange through a reference with static type Class.
if (problemSolved == false)
{
stress += 10
}
else
{
celebrate(stress)
}
{
stress += 10
}
else
{
celebrate(stress)
}
Hi. Did you realize that you're using the wrong documentation? That documentation is for SFS1x. For SFS2x AS3 Client API Documentation go to:
http://docs2x.smartfoxserver.com/api-docs/asdoc/
And to check the SFS2x documentation simply go to http://docs2x.smartfoxserver.com/
http://docs2x.smartfoxserver.com/api-docs/asdoc/
And to check the SFS2x documentation simply go to http://docs2x.smartfoxserver.com/
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
solveProblems()
- Posts: 8
- Joined: 21 Jun 2011, 12:39
- Location: Brazil
-
solveProblems()
- Posts: 8
- Joined: 21 Jun 2011, 12:39
- Location: Brazil
If there's anyone out there please explain to me
http://docs2x.smartfoxserver.com/api-do ... USER_COUNT
What does " ${UC}" means?
http://docs2x.smartfoxserver.com/api-do ... USER_COUNT
What does " ${UC}" means?
if (problemSolved == false)
{
stress += 10
}
else
{
celebrate(stress)
}
{
stress += 10
}
else
{
celebrate(stress)
}
-
solveProblems()
- Posts: 8
- Joined: 21 Jun 2011, 12:39
- Location: Brazil
I solved the problem with this:
myRoom is a temporary instance.
Global.mainClass.sfs is my smartfox instance.
roomList is a properti that returns a array with the rooms in it.
is for me to get all rooms (in a simple for).
Thanks everyone, I hope this thread helps someone in the future.
Code: Select all
var myRoom:Room = Global.mainClass.sfs.roomList[i] as Room;
Global.mainClass.sfs is my smartfox instance.
roomList is a properti that returns a array with the rooms in it.
is for me to get all rooms (in a simple for).
Thanks everyone, I hope this thread helps someone in the future.
if (problemSolved == false)
{
stress += 10
}
else
{
celebrate(stress)
}
{
stress += 10
}
else
{
celebrate(stress)
}