Sending Messages & Actor Movement

Kiyaku
edited May 2010 in DotNet
Hi,
i just started reading through the Photon Unity Island MMO Example and i think i get the logic behind creating user, sending positions, etc.

But i am trying to find out how you would, for example, send a string to all other clients and display it.
Would you need to rewrite the server (Mmo.sln) or are there build in methods already?

I hope this could help me to understand it a bit better.

EDIT:
I also got a question about the Actor Movement. In the Island demo, they move around in random positions.
Now i kinda want to be able that other people control the chars. So when a new player joins, how can i sync the positions between his local and his remote object?

Thanks in advance!

Comments

  • Hi,
    there is no build-in functionality for global events, but you can create a MessageChannel with your world, have everyone subscribe when entering it and add a new operation to send messages through this channel.
    In respect to your second question: I'm not sure I understand it... every client that calls EnterWorld has an actor and updates his position when he moves... All the random movement you see from the grid demo are just fake people. If you had 10 people starting the island demo and running around you would see that their remote object is in sync with their current position.