Blockland Forums > Modification Help
Graphical User Interface help
<< < (2/3) > >>
computermix:

--- Quote from: Uristqwerty on December 02, 2010, 09:30:36 AM ---The best (only?) way to get the score from the server is to have the server send you the score, usually through a commandToClient. One method would be to send the data any time it changes, while another way is to send it in response to a commandToServer.

Since you are mainly working on the GUI, you could use something like this:

server.cs:

--- Code: ---function serverCmdGetScore(%client)
{
    commandToClient('setScore', %client.score);
}

--- End code ---

client.cs:

--- Code: ---function clientCmdSetScore(%score)
{
    YourGUIScoreDisplay.text = %score;
}

--- End code ---

You would have to change score to something else in the serverCmd, clientCmd, commandToServer, and commandToClient, because it's probably already in use, and the display text name will probably need to be changed, too, but that code would be good enough for testing.

--- End quote ---
So, Really, you need a "Commandtoclient" before you can receive the data?
computermix:
So, I tried the client cmd thing, (You know, put the first script into server.cs and modded it, same with the client.cs) and it didn't work, as in it was still "0" And im sure my score was at least one.
takato14:
Spelling out Graphical User Interface like that makes you sound nub-ish.

But, it did get me to view your topic, so I guess it served its purpose, then.
computermix:

--- Quote from: takato14 on December 04, 2010, 02:07:25 PM ---Spelling out Graphical User Interface like that makes you sound nub-ish.

But, it did get me to view your topic, so I guess it served its purpose, then.

--- End quote ---
So, why do you say this? Its off topic, and useless.
takato14:

--- Quote from: computermix on December 04, 2010, 02:35:09 PM ---So, why do you say this? Its off topic, and useless.

--- End quote ---
Felt like it. :U

Why bother replying to just tell me how stupid I'm being?
Navigation
Message Index
Next page
Previous page

Go to full version