NetLogo banner

 Home
 Download
 Help
 Resources
 Extensions
 FAQ
 References
 Contact Us
 Donate

 Models:
 Library
 Community
 Modeling Commons

 User Manuals:
 Web
 Printable
 Chinese
 Czech
 Japanese
 Spanish

  Donate

NetLogo Models Library:
HubNet Activities/Code Examples

For information about HubNet, click here.

(back to the library)

Client Overrides Example HubNet

[screen shot]

If you download the NetLogo application, this model is included. (You can also run this model in your browser, but we don't recommend it; details here.)

WHAT IS IT?

This example demonstrates how to use overrides in HubNet.

HOW IT WORKS

The most important part of the code is found in the EXECUTE-COMMAND procedure. When the server receives a message that the client clicked on the view it sends a message back to the client to change the color of the nearby patches.

Note that this feature will only work if you have the "Mirror 2D view on clients" box checked in the HubNet Control Center.

THINGS TO TRY

Comment out the line:

 hubnet-clear-overrides hubnet-message-source

what changes?

NETLOGO FEATURES

This model demonstrates basic usage of HUBNET-SEND-OVERRIDE and HUBNET-CLEAR-OVERRIDES.

(back to the NetLogo Models Library)