Posted By
|
Message
|
Tiri
Registered 16/01/2004
Points 78
|
28th January, 2004 at 12:09:33 -
ok i got another question for mooclick...
ok so when someone conencts it adds there character to the game...i want to somehow set a value on the character to their name
then when i hightlight them after their name was saved it will show that users name in another box
n/a
|
Rycon
Registered 20/09/2002
Points 996
|
28th January, 2004 at 13:51:40 -
You cannot save strings to values, so to do what you want to do, make a string (invisable) and when a player connects, set the string to the players username, and then if the player is getting highlighted, set the other string or box thing you have to the invisable string that contains his username.
This is even still, doing a extra step since you could just set the box thing you have to other players username without first putting it in its own string. It just depends on what your doing. I havnt messed with mooclick much, but this is how im guessing it would look:
If mouse overlaps player2 = Set 'box' to REMOTEUsername$
Or the first way:
Always = Set 'String' to REMOTEUsername$
If mouse overlaps player2 = Set 'box' to 'String'
I think I have over explained this enough. lol
We are the music makers, we are the dreamers of dreams...
|
Tiri
Registered 16/01/2004
Points 78
|
28th January, 2004 at 18:02:15 -
that would work but what if someone else joined the game it would change it to a different name and be that name for every person
n/a
|
Rycon
Registered 20/09/2002
Points 996
|
28th January, 2004 at 21:01:48 -
In that case you will want to make a list object, every time a player joins add there username to the list. Just make sure and keep track of wich line number they are on.
We are the music makers, we are the dreamers of dreams...
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
29th January, 2004 at 00:11:32 -
Rycon - But that would have to be on the server side. If you can't acess the server for a reason such as using the free mooapi servers then you will need to try something else. I think what you are looking for are "User IDs". You could always set the character's alt a (assuming when your user's log on a active object is created for them) to it's ID. You can find the user's ID in the expressions under Mooclick>Player>GetID. So you use that when a player logs on:
Player> On user Connect - Set player.alt a to ( P_GetID( "MooClick" ) )
Then when you want to know the user's ID you send the ID and the Name of the player that is sending it. Or the recieving client can get the player's name from the expression editor, then Getusername that the message was sent from (I'm not sure if that last part works).
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
|
Rycon
Registered 20/09/2002
Points 996
|
29th January, 2004 at 00:38:14 -
Hmmm yes that would be better, you could highlight a player, wich has his ID, then you send a msg to the ID and it respondes with his username, wich you then put in the box.
We are the music makers, we are the dreamers of dreams...
|
|
|