Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: HeathClose on July 08, 2017, 05:34:53 PM

Title: Photon Swap Sprite? [SOLVED]
Post by: HeathClose on July 08, 2017, 05: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?
Title: Re: Photon Swap Sprite?
Post by: djaydino on July 09, 2017, 12:48:37 AM
Hi,
Can you give some more information?

How you set this up and maybe a link to that other thread?
Title: Re: Photon Swap Sprite?
Post by: HeathClose on July 09, 2017, 12:25:39 PM
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