Announcement

Collapse
No announcement yet.

Indexing Each Player with a Number

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Indexing Each Player with a Number

    Hello. I am trying to create a for each event ran on the server for all of the connected players in a session to be assigned an individual number in the PlayerInfo Structure. For example, Player 1 would be assigned 1, player 2 would be assigned 2, etc. Can someone please send me an example of this loop? Thank you.

    #2
    Does something like this help you?

    Click image for larger version

Name:	image_200762.png
Views:	82
Size:	37.5 KB
ID:	1802731


    Player Array should be a list of connected clients, not sure what your Playerinfo Struct looks like but you should be able to use this loop to get the number of connected players through this.

    https://docs.unrealengine.com/en-US/...ode/index.html
    https://docs.unrealengine.com/en-US/...ate/index.html

    Comment


      #3
      Originally posted by DJ8189 View Post
      Does something like this help you?

      Click image for larger version

Name:	image_200762.png
Views:	82
Size:	37.5 KB
ID:	1802731


      Player Array should be a list of connected clients, not sure what your Playerinfo Struct looks like but you should be able to use this loop to get the number of connected players through this.

      https://docs.unrealengine.com/en-US/...ode/index.html
      https://docs.unrealengine.com/en-US/...ate/index.html
      Click image for larger version

Name:	Capture.PNG
Views:	39
Size:	69.7 KB
ID:	1803800

      So something like this? I don't think it's working. I'm trying to index each player by assigning them a value in order to make it easier in to call certain players.

      Comment


        #4
        Is this local multiplayer or online?

        Comment


          #5
          Originally posted by DJ8189 View Post
          Is this local multiplayer or online?
          Online multiplayer through steam. If I can have an event run on server that indexs each player and adds it to their playerinfo struct, I can call from that struct (eg. spawn all players with indexes 1-4 somewhere and 5-8 somewhere else.)

          Comment


            #6
            I am a noob and this is how I give players numbers :d

            1, On the gamemode:
            Click image for larger version  Name:	exampleForUm.png Views:	0 Size:	260.7 KB ID:	1804211
            2. On the player character BP
            Click image for larger version

Name:	22.png
Views:	48
Size:	328.3 KB
ID:	1804212
            Last edited by Psy-Lance; 08-24-2020, 01:11 AM.

            Comment

            Working...
            X