Mooclick/Online Game Help
I'm developing a game that will be able to do Online Battles. I know that you have to send messages/text with MooClick, and all that jive. The problem is this:
1. OK I have 3 Global Strings that I want to use... Global String A , Global String B, and Global String C. I want Global String C to copy Global String A. Then I want Global String C to be sent to the other game online (Basically I want both games to swap their Global String Cs). Global String B would then copy Global String C. Also how do you do the same for Global Values (I know I'm definitely going to need this in the future).
2. I want to limit a server to only 2 people... How do I do this??????????
The online portion of the game has basically been modeled from Flava's MooClick Example File.
Re: Mooclick/Online Game Help
2) If you want to limit a server you need two events, mooclick and a "connect" button.
* Button "connect" clicked
+ Special> Compare 2 general values> (MooClick)Get Number of Users < 2
- Connect to server
Hope this helps! :)
Re: Mooclick/Online Game Help
Hmmm... I can't seem to find Get Number of Users... Although I see "Count Players" and "Count Users" would one of them work? [confused]
What about "Count Connections"???
Re: Mooclick/Online Game Help
Well, it is kind of complicated. You are the player and other people are users. So the code would actually be
+Button clicked
+# of Users < 2
- Connect to server
You would do users because that is OTHER players. Therefore that code says in English, "When a button is clicked and there is one other human or no other humans you can play. If there is more than 2 other players you cannot play.
So to answer your question, count users would be acceptable and count players, servers or connections would not.
(I never really knew what count servers was for)
Re: Mooclick/Online Game Help
i hav the same problem. i wanna make an online game! and there is no compare 2 generall values in special.
Re: Mooclick/Online Game Help
There is a compare two general values under special conditions :P Look a little harder.
If you want to limit the number of players to a server then I suggest you get the server to kick the last client to join when there are more than 3. Because I'm pretty convinced that you can't get the number of Users on a server without connecting to it. That doesn't really make sense. I would have thought that MMF wouldn't know which server you are talking about. Correct me if I'm wrong though, I haven't tested that.
So my idea. When the server detects that a third person has joined, it simply sends a message to the client saying he can't join. When the client recieves the message, it closes the connection.
Re: Mooclick/Online Game Help
No, the server sends the message and kicks the client off. NEVER depend on the client to disconnect or similar because it is so darn easy to bypass.
Re: Mooclick/Online Game Help
Oh ok thanks XDDDD
Now on to my first question... I think it was a bit too confusing... To put it simple...
How do you send Global Strings and Global Values with Mooclick? So like 1 Game can change a Global String/Value of the other Game. I need the specific command btw.
Also how do you copy a global string to another one (like let's say Global String A has "Cheese" and I want Global Sting B to have "Cheese" as well).
Re: Mooclick/Online Game Help
For copying one global string to another, just set the one to the other.
E.g. "Set global string A to 'Global String B'".
To send it, you make up some syntax that the other players look for and send it around. E.g. you send a string like this (I made this up):
"GA:hello"
You have to then listen for incoming strings and check if the first character is "G" (in this case for "global"), the second "A" or "B", etc. (here for the certain global value), then parse everything after the ":" which is the string to be delivered.
There's no default solution for this I think. Make something up!