playMaker

Author Topic: Syncing NON-player events with Photon  (Read 2630 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Syncing NON-player events with Photon
« on: August 23, 2013, 03:30:45 AM »
Whats the process for having an event (scripted by an in-game event, (Time of day for example) or character interaction, so that the OTHER players will see this event.

Lets use this example (although I will need lots of different things, so hoping its simple and repetative process once a solution is found)

Four friends are playing together over Photon (I have this working from long ago). A door is activated by clicking on it, it plays an animation, and opens (other events happen simultaneously, a sound plays, a spotlight inside the has its "cone" ratio animated to fake light streaming out of the door)
ONE player clicks on the door, but the other players also see the door open and hear the sound.

An obvious addition to this, is that only one payer has the key, but I think this is trivial, he has the global variable "haveKey" as true...

Thanks

MArk
« Last Edit: August 26, 2013, 08:24:24 AM by markfrancombe »

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Syncing NON-player events with Photon
« Reply #1 on: August 26, 2013, 08:26:29 AM »
bump?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Syncing NON-player events with Photon
« Reply #2 on: August 26, 2013, 09:59:54 AM »
Hi,

 The door will need to have a networkView component, just like a player does. Photon networking doesn't just stop at "player" paradigm. you can have anything synched.

The door would be part of the scene, and for this Photon will deal with this automatically, simply have your door already in your hierarchy, that's all.

Bye,

Jean

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Syncing NON-player events with Photon
« Reply #3 on: August 26, 2013, 02:19:11 PM »
Wow, sometimes its simple... not often, but sometimes!
 ;)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
(SOLVED)Re: Syncing NON-player events with Photon
« Reply #4 on: August 26, 2013, 02:19:28 PM »
Whats the process for having an event (scripted by an in-game event, (Time of day for example) or character interaction, so that the OTHER players will see this event.

Lets use this example (although I will need lots of different things, so hoping its simple and repetative process once a solution is found)

Four friends are playing together over Photon (I have this working from long ago). A door is activated by clicking on it, it plays an animation, and opens (other events happen simultaneously, a sound plays, a spotlight inside the has its "cone" ratio animated to fake light streaming out of the door)
ONE player clicks on the door, but the other players also see the door open and hear the sound.

An obvious addition to this, is that only one payer has the key, but I think this is trivial, he has the global variable "haveKey" as true...

Thanks

MArk