playMaker

Author Topic: Avatar images photon  (Read 2126 times)

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
Avatar images photon
« on: February 26, 2013, 10:30:24 AM »
Hello all, I was wondering is it possible to have avatar images using photon?

What I mean is that when you login you select an image that will then appear as a GUI icon inside the game so that you can see the other players? My game is only two players so will only require one image somewhere in the games GUI.

Thanks

WB

Ps if this is possible what about animated avatars which when certain events are triggered will play different animations? I have tk2D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Avatar images photon
« Reply #1 on: February 26, 2013, 01:43:58 PM »
hi,

 yes, that's possible, and it's actually not really related to photon.

If you are pulling the avatatr image from an online system, then the gameObject that is instantiated using photon, will know the user id it represent, and then it can broadcast a message ( a regular playmaker message, not a rpc event), so that the gui responsible to shwo the avatar know which user is now present.

 if your avatar images are simply stored in the assets, then it's basically the same process, but it doesn't get the texture from an online source, but simply from a fsm var that you have filled up, either hardcoded ( one fsm var for each avatar) or using arraMaker to host a more flexible list of avatars you can poll from.

 Does that make sense?

 basically, this has nothing to do with photon in a way. try to do it first without any photon related feature, simply instantiate a prefab and tell that prefab that it needs to show its avatar to the gui. If you can do that, moving into a photon based prefab will simply be a matter of rerouting that call.

bye,

 Jean

will_brett

  • Junior Playmaker
  • **
  • Posts: 72
Re: Avatar images photon
« Reply #2 on: February 26, 2013, 01:50:30 PM »
Thanks again Jean,

Im not entirely sure what you mean, but I will give it a go and see where I get.

By now you have probably realised I am not anywhere near an expert on this. Im actually a University Student studying product design. However I have a passion for games and am really interested in learning game design so I really appreciate all the help you have given me.

All the best

W