Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  • Creating The Player Actor
  • Spawning Player Actors
  • 1. Selecting The Player Actor Class
  • 2. Define Player Actor Spawn Locations
  • Updating Player Actors
  1. Usage
  2. Party

Party Player Actors

PreviousManaging Party PlayersNextLeaving Parties

Last updated 8 months ago

The party system has the ability to spawn a KronosPartyPlayerActor for each party member in the party. This allows you to spawn a character for each player visually in the game world.

The that is shipped with the plugin showcases how this feature works. The example blueprints also contain additional information.

Creating The Player Actor

Create a new blueprint from the KronosPartyPlayerActor class.

By default the actor doesn't have a mesh, so I'm going to add a SkeletalMeshComponent to it.

Spawning Player Actors

1. Selecting The Player Actor Class

The spawning of player actors are handled automatically by the KronosPartyState class. In order to select which KronosPartyPlayerActor class to use, you will first have to create a new blueprint from the KronosPartyState class.

Now inside the "Details" panel simply select the "PartyPlayerActorClass" that should be spawned for players when they join the party.

Don't forget to go into Project Settings -> Kronos Matchmaking and set the "Party State Class" to your custom blueprint that you just created.

2. Define Player Actor Spawn Locations

To define where these player actors should be spawned, we need to place KronosPartyPlayerStart actors into the level. You can find this actor in the "Place Actors" tab on of the engine. The amount of player starts required is based on the party size.

After placing these into the level, one of them should be marked as the local player start. The local player's KronosPartyPlayerActor will be spawned on this player start.

Updating Player Actors

You may want to update your player actors based on for example which character is selected by the player. In order to do this, there is one important thing to understand.

Party player actors are not replicated. They are always spawned locally. Each party player actor is tied to a player's KronosPartyPlayerState. The idea is that all replicated variables should be contained in the party player state, and party player actor should just "visualize" the state of these variables inside the party player state (e.g. change skeletal mesh based on selected character id).

From party player actor: Use the GetOwningPartyPlayerState function to access the player state of the party client that this actor represents .

From party player state: Use the GetPlayerActor function to access the party player actor of this player state.

The KronosPartyPlayerActor class has a built-in feature that renders a widget above the character. Inside the "Details" panel simply select the "Player Widget Class" that should be rendered above the actor. I'm going to use the example party player widget from the of the plugin. Then use the "Player Widget Draw Size" to set the canvas size for the widget.

Example Content
Example Content