playMaker

Author Topic: Photon Room Properties and Pickups?[SOLVED]  (Read 1970 times)

adrian

  • Junior Playmaker
  • **
  • Posts: 52
Photon Room Properties and Pickups?[SOLVED]
« on: March 25, 2016, 10:03:22 AM »
Hi all,

I've come quite far with a photon multiplayer game and I am now working on health/ammo pickups.

I have set up a manager which is working correctly to relay messages between logged on clients to remove pickups from all players scenes correctly.

The problem I have is with a new player joining the room as all previous remove messages for the pickups are obviously not retained and so they will see everything even if its already been picked up and removed by other players.

I have some idea that I should be using Photon custom room properties to allow a list to be formed and then be read as a player enters the room to "catchup" with whats has been picked up already and disable relevant pickups but I can't work out how to do this?

What is the best way to store this list as I am aware the arraylists do not play well with Photon? How would I implement something like this?

Any help gratefully received!
« Last Edit: March 30, 2016, 06:28:06 AM by jeanfabre »

adrian

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon Room Properties and Pickups?
« Reply #1 on: March 26, 2016, 08:44:50 AM »
Ok got it sorted, when you create a room you set a blank string in the custom room properties for the pickups, then when they get picked up you add their name to the string.
When you join the room you grab the string from the room properties do a string to array conversion, then disable all the objects found in the array (by name not actual game object).

This seems to do the job but let me know if I've missed something!