Search Unity

[Photon] How to execute a a function after a client is disconnected? Please Help!

Discussion in 'Scripting' started by Red_Kay, Jul 13, 2016.

  1. Red_Kay

    Red_Kay

    Joined:
    Aug 14, 2015
    Posts:
    94
    Yo!

    So, I am making a game like CS - GO, till now I have implemented everything, like bomb planting, defusing, killing etc etc. The bomb GameObject is in group with player which has the bomb. So, when that player disconnects the bomb gets destroyed with it too.

    How do I apply a lil force and de-group it if the bomb carrier leaves ??

    Thanks for your time!
     
  2. SkaredCreations

    SkaredCreations

    Joined:
    Sep 29, 2010
    Posts:
    296
    Put your code in a function: void OnPhotonPlayerDisconnected(PhotonPlayer player)
     
  3. Red_Kay

    Red_Kay

    Joined:
    Aug 14, 2015
    Posts:
    94
    Thanks alot!
    Also, is there any place where I can find all these kind of functions?
     
  4. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,735