playMaker

Author Topic: Photon Network Kick Player  (Read 7006 times)

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Photon Network Kick Player
« on: September 04, 2013, 12:16:43 PM »
Hello

Anybody have easy idea for kick player ?

=======================================
My difficult idea :

-When player prefab connected, he get count "player" tags, example
 2 player was on server so now 3.... so he get 3 and he number is 3..

The map have a admin room, where is a static admin cube game object,

This object have trigger interaction with a number pick. example if the admin
stay on cube and push key, he can set the number, in cube.

The player prefab kick self, if the admin block have same number as my number...

The admin can check the player + numbers list, because when my prefab pick number, he can send my name in to admin cube fsm.

So the player kick self when the number is same int as the picked self number

==========================================

Sorry for my english.. :D
So it is my idea, I think we can do this better.
« Last Edit: September 10, 2013, 08:29:48 AM by Bqlqzs »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Kick Player
« Reply #1 on: September 09, 2013, 01:56:13 AM »
Hi,

 I am not sure what is the question here. Your description seems fine. Where do you have a problem implementing this?

There is one thing that will likely help you along the way: Photon Rooms can have custom properties, so it may be very interesting for you to have your static cube maintain custom properties on the room itself so that all your players can check them out consistently.

Bye,

 Jean

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon Network Kick Player
« Reply #2 on: September 09, 2013, 05:30:23 PM »
I try to do this, but it isnt work.... because I cant synch name string... Why?

In characters:
- I get my photon view own name string and put in a global string as [Myname]

Admin:
He can open a textfield, and after he type a good code, he Instantiate a admingameobject.

In this Admingameobject he can open a:
Photon guiLayout toolbar with players (so he get a clickable playerlist..)
And after he pick player, the player name set in a string, and this string set in the Admingameobject [Name (synch)] varriable (every frame) and this is checked to synch on network

If you not owned this admingameobject, the photon mine go to check state..

If my name string = picked synch name string -> I leave room (kick myself :D)



Ok it is good, but.... The [Name string synch varriable] dont send anything...
This string varriable is empty over the network...
But the position and rotation is good synched..
so the connection is perfect..

The string isnt synchable? I cant synch strings?

If not How can I get [Int] ID from player list?
the problem is the player list output name string and int, but not ID..
and I cant synch string

"The selection event int data contains the player index" it also isnt work...
I every pick get 0 so...

This player list toolbar very useless... because now the only ways get the target player in a gameobject and now i can get the id.. but it is very useles..
because If the player run, or anything, I need capture him.. for create gameobject varriable with example mouse pick...
« Last Edit: September 10, 2013, 10:39:27 AM by Bqlqzs »

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon Network Kick Player
« Reply #3 on: September 11, 2013, 11:19:32 AM »
anybody?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Kick Player
« Reply #4 on: September 13, 2013, 03:53:05 AM »
Hi,

 Ok, I see. I will run some tests to make sure strings get synched, they should. I'll get back to you with my findings.

 Are you definitly using the latest playmaker from the asset store?

bye,

 Jean

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon Network Kick Player
« Reply #5 on: September 13, 2013, 04:31:36 AM »
Hi,

 Ok, I see. I will run some tests to make sure strings get synched, they should. I'll get back to you with my findings.

 Are you definitly using the latest playmaker from the asset store?

bye,

 Jean

I tried the latest version too, but string synch not worked for me..

Now I use the Half solution , If I run the game in Unityeditor, I can see the players ID in photonview and manually I can set kick number... but it need to UnityEditor...
and this isnt universal...

Thx for tried help, but leave this.. I dont want do work for you.. :)
I will use editor for kick and thats all..
(The bigger problem is a official photon game version check lack of, I opened an another Topic...)