Author Topic: Send items to other players using Photon  (Read 2482 times)


  • Junior Playmaker
  • **
  • Posts: 72
    • View Profile
Send items to other players using Photon
« on: February 02, 2013, 02:48:57 PM »
I am trying to figure out how to send an item to another player.

What I want is for one player to press a gui button which will then send an item to the other player (this is a 2player game) When the player receives the item it will appear as a 3d object with an animation but wont appear on the screen of the player that sent it.

Can anyone give me a clue or a point in the right direction to achieve this? I've already got the chat function up and running and photon server is setup




  • Administrator
  • Hero Member
  • *****
  • Posts: 15060
  • Official Playmaker Support
    • View Profile
Re: Send items to other players using Photon
« Reply #1 on: February 08, 2013, 12:28:46 AM »

If you understand the concept of how the player prefab was constructed, creating a new feature ( not a player), is the same procedure.

-- have a prefab in the Resources folder ( very important for it to be in a Resources folder, else you will get errors)
-- AT LEAST a photonView so that when you instantiate it over the network, it appears to all users
-- if you plan on synching variables ( for example its color, or random property), implement a fsm that is enabled for networked synched variable ( the photon wizard will help you set up this fsm for you :) )

 then you need to do the "is mine" dance, to know when to actual act or react. When "Is mine" is true, you are then in charge, and you should take actions and indeed set values on the synchronized variables. if "is mine" is false, then you should read the synchronized variable and apply them values.

Does that make sense?