playMaker

Author Topic: Pun 2 Skin Player Help[SOLVED]  (Read 794 times)

scage

  • Playmaker Newbie
  • *
  • Posts: 10
    • My Personal Page Itch.io
Pun 2 Skin Player Help[SOLVED]
« on: July 04, 2020, 07:47:37 AM »
Hello, 8)

good Saturday to all, on Saturday I dedicate it to learning new things.
 I have a working multiplayer that runs with pun 2 with server on my machine. the characters move well in the scene. I have different 3D character models and I wish I could change it by colliding with an object on the main stage.

  Let me explain:
 Player 1 (Skin Explorer) collides with the cube and activates the skin police.
 my collision does not work with my character suddenly I put the F1 key in Get Key Down the character changes skin but player 2 does not see it.

What are the steps for active or not active object to work in multiplayer? Thanks for your help.
« Last Edit: July 13, 2020, 03:21:08 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Pun 2 Skin Player Help
« Reply #1 on: July 06, 2020, 01:26:10 AM »
Hi,

 you have many ways to achieve that.

- using RPC you can send an event across the network for all clients to get informed about something happening in the game, the probem with that is if you have a player joining late, he will not have receive previous RPC so he might be out of sync

- using player custom properties, this is the preffered way because youc an set a custom property and all network instances of that player on all  clients will get an informed and so you could save the skin ID in the player custom properties and act both as a data storage and an event for all clients to sync their skin

- using room custom properties, same as player but this more for general game purposes, like best score or scene/levels features.

Bye,

 Jean

scage

  • Playmaker Newbie
  • *
  • Posts: 10
    • My Personal Page Itch.io
Re: Pun 2 Skin Player Help
« Reply #2 on: July 12, 2020, 09:16:25 AM »
Hello,
sorry to answer that now.
ok, thanks for the information, I was also thinking about the RPC at the start, so I'm going to test the second solution.
I will keep you posted as soon as I have tested this solution.

see you soon

scage

  • Playmaker Newbie
  • *
  • Posts: 10
    • My Personal Page Itch.io
Re: Pun 2 Skin Player Help[SOLVED]
« Reply #3 on: March 13, 2021, 12:00:18 PM »
Hello,
last week I had some free time. so i took a day to solve my problem from a year ago. thanks for the advice, which I applied for my multiplayer prototype. it's only a base but I'm already proud of my base. my goal was more to learn online multiplayer than to create a multiplayer game. sorry again for my english.
https://twitter.com/i/status/1370337951301959686
Best regards
Scage

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Pun 2 Skin Player Help[SOLVED]
« Reply #4 on: May 12, 2021, 01:56:45 AM »
Hi,

 Cool, good luck with your project!

Bye,

 Jean