Announcement

Collapse
No announcement yet.

Respawning and keeping track of players (local multiplayer)

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

    Respawning and keeping track of players (local multiplayer)

    I'm in the middle of trying to get a Pre-Alpha of my game ready (hopefully by 12/25/15) its a 4 player PVP FPS I've got it at a point where I can kill other players but I'me having trouble respawning them

    this is what I'm using to damage & kill the player
    Click image for larger version

Name:	ef7b17c72f775408ebdee7cf8a48aa74.png
Views:	1
Size:	150.4 KB
ID:	1168852
    the projectiles from the weapons call the AffectHealth

    You might knotice there is shields before health shields doesn't recharge right now so basically its a extinction to health (thow I hope to get it to recharge later-on)
    both shields and health are set to 100 for a total of 200 (for any reason you need that)

    if you need anything else ask and I'll get it to you as soon as I can.

    #2
    All you need to do to "respawn" the player is Spawn a new character at the desired location and have that Players Controller Possess the new character.

    I generally handle Respawn events for players in the Gamemode executed on the Server for a multiplayer environment.
    Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

    Comment


      #3
      Yeah I tried that, but I'm having trouble specifying which player to respawn

      like if player 3(4) kills player 2(3) it would respawn player 0(1)

      and player 2(3) would remain dead

      Comment


        #4
        My Player Characters dont ever handle Destroying themselves.

        What happens generally in one of my setups is, the Player Character determines that its health has reached 0 or less, it then calls an Replicated Custom Event that passes that Player Characters controller to a function in the Gamemode. This function validates the request for respawning the Player Character, spawns a new Player Character at the desired location, then it destroys the old (Now considered dead) Player Character and then possess the new one with the Controller reference that was passed through.

        Unless you can show screenshots of your setup i cant really help you with why your respawn logic isnt working correctly for the right Player.
        Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

        Comment


          #5
          I figured it out I'll be posting how it did it latter so if anyone else is having this issue they can see here.

          Comment

          Working...
          X