The Daily Click ::. Forums ::. Klik Coding Help ::. Network Help
 

Post Reply  Post Oekaki 
 

Posted By Message

John Taylor



Registered
  27/01/2006
Points
  2
27th January, 2006 at 23:21:14 -

How do I actually use the Network object to send data, and more importantly, to retrieve that data? Can anyone provide me with an example of how to use the Edit Text box if I want to set the contents of the Edit box to the data retrieved from the Network object? I really appreciate the help!

Image Edited by the Author.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
28th January, 2006 at 09:59:34 -

Hmmm... I've used it quite a few times, I think it was something like this:

Start of level:
*open channel "computer 1" as 0

[event]
*Send string "Lolz whatever" to "computer 2"

Message available on channel 0:
*Edit object: Set text to ( Net String$( "Network", 0 ) )

On the other computer you obviously open channel 0 as "computer 2", but you could also let the player enter its name in a edit object etc. Then you can send strings of text on the channel, to different slots. You can have multiple channels open at the same time, allowing you to send all kinds of data between the computers, like chat messages, player position, etc. To send player positions you can send the player's coordinates and direction value in one string, like "27,12,7", and then just string parse it on the other computer.

Now I think there are other, better network objects out there, on the extension list. I think Dplay could play over a LAN, so you might want to check that out too.

www.clickteam.info/extensions/

Image Edited by the Author.

 
n/a

John Taylor



Registered
  27/01/2006
Points
  2
30th January, 2006 at 05:02:34 -

Thanks a bunch!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click