playMaker

Author Topic: Photon Swap Sprite? [SOLVED]  (Read 103 times)

HeathClose

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Photon Swap Sprite? [SOLVED]
« on: July 08, 2017, 02:34:53 PM »
So when I tap on the screen, it changes a bool... a bool test every frame in state 1 detects the change... sends it to state 2 where my player swaps sprites.. and when I let up my finger... the bool test goes false in state 2... and sends it back to state 1 where the sprite resets as it exits state 2... simple...clean...easy... I need this to be visible to all other clients.

I thought I had this figured out in another thread... as I did get it to send events based on the bool test and broadcasting an event to the other clients... but what I found was... it changes the sprites of every player on all the client that isn't "IS MINE"...

How do I simply swap out a sprite on the correct player across all clients?
« Last Edit: July 09, 2017, 09:26:00 AM by HeathClose »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2254
    • View Profile
    • jinxtergames
Re: Photon Swap Sprite?
« Reply #1 on: July 08, 2017, 09:48:37 PM »
Hi,
Can you give some more information?

How you set this up and maybe a link to that other thread?

HeathClose

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Photon Swap Sprite?
« Reply #2 on: July 09, 2017, 09:25:39 AM »
so what I did to achieve this sprite swap over the network might not work for everyone because it is a single sprite... but this would work for a single sprite or sprite animation....

what I did was duplicate the sprite and drag both into the scene creating an "animation"... then when I tap, the tap changes an animator bool to the animator state that is "animating" the two identical sprites...

then i added another slot to the observed components on the 'photon view' and dragged the 'photon animator view' to it

now the sprite changes across all clients properly