Skip to content

Recipes

  1. Open your Player State Blueprint and go to Class Settings → Interfaces.
  2. Add Sumo Team Provider Interface.
  3. Implement Get Team ID and return the team number from your own team system. Return 255 for a player without a team.
MyPlayerState.h
#include "Interfaces/SumoProviderInterfaces.h"
UCLASS()
class AMyPlayerState : public APlayerState, public ISumoTeamProviderInterface
{
GENERATED_BODY()
public:
virtual uint8 GetTeamID_Implementation() const override { return TeamID; }
UPROPERTY(Replicated)
uint8 TeamID = 255;
};
// MyPlayerState.cpp: register TeamID in GetLifetimeReplicatedProps
// with DOREPLIFETIME(AMyPlayerState, TeamID).

Send pings to everyone in a game without teams

Section titled “Send pings to everyone in a game without teams”

On the Sumo Comm component, open the advanced properties and enable Treat Unassigned As FFA. Players without a team then send to and receive from every player.

  1. Create a Comm Wheel Definition Data Asset and fill Entries. Assign it to Ping Wheel or Comm Wheel in the Comm Config.
  2. On the Sumo Comm component, set Ping Wheel Widget Class or Comm Wheel Widget Class.
  3. Wire the input action:

IA_CommWheel (Started) → Open Wheel (Wheel: Comm Wheel)

IA_CommWheel (Completed) → Commit Wheel (Wheel: Comm Wheel)

The component creates the widget, shows and hides it, and sets the cursor and input mode.

Use one key for quick ping on tap and the ping wheel on hold

Section titled “Use one key for quick ping on tap and the ping wheel on hold”
  1. Map both input actions to the same key.
  2. Give the quick ping action a Tap trigger and the wheel action a Hold trigger.
  3. Set Tap Release Time Threshold and Hold Time Threshold to the same value, for example 0.2.
  4. Leave Is One Shot off on the Hold trigger.
  5. Wire the events:

IA_Ping (Triggered) → Request Quick Ping

IA_PingWheel (Triggered) → Open Wheel (Wheel: Ping Wheel)

IA_PingWheel (Completed) → Commit Wheel (Wheel: Ping Wheel)

Leave Canceled of the wheel action unwired. It fires when the key is released before the hold time, which is the quick ping case.

Your death event → Cancel Wheel (Target: Sumo Comm)

Cancel Wheel closes the open wheel without sending and restores the input mode. It has no effect when no wheel is open.

Make an actor pingable with its own callout

Section titled “Make an actor pingable with its own callout”
  1. Add a tag under Sumo.PingTarget in Project Settings → Gameplay Tags, or use Sumo.PingTarget.Objective.
  2. In the actor’s Details panel, under Actor → Tags, add the full tag name, for example Sumo.PingTarget.Objective.
  3. Make sure the actor blocks the Visibility channel.
  4. In the Comm Config, add an item to Quick Ping Overrides. Set Actor Tag to the same tag and fill Override Entry with its own ID, name, icon and sound.

For a moving actor in multiplayer, enable Replicates and Replicate Movement on it.

In the entry, switch off Shows In World and Shows On Minimap. Set Sound. Leave Is Personal off to play the line at the sender’s position, or switch it on for a 2D sound.

Set Lifetime Sec on the entry. The world marker and the minimap marker share the value.

Open your marker Blueprint (B_SumoPing or your subclass), select the InfoWidget component and change Draw Size. Or enable Draw at Desired Size and size the widget itself.

In your marker Blueprint, override BP Format Distance. Write your text to Out Text and return true.

BP Format Distance (In Distance Meters) → Multiply (× 1.094) → To Text → Format Text ("{0} yd") → Return (Out Text, true)

In the marker widget, bind Render Opacity to:

Owning Ping → Get Distance Opacity

Set Fade Start Distance, Fade End Distance and Min Fade Opacity on the marker Blueprint.

In the marker widget, bind Visibility of the zone text:

Owning Ping → Zone Name → Is Empty (Text) → Select (True: Collapsed, False: Self Hit Test Invisible)

Sumo Comm → On Comm Received (Entry ID, World Location, Target Actor, Sender) → Comm Config → Find Entry By ID (Entry ID) → your minimap: add marker (Icon, Color, World Location, Lifetime Sec)

Implement ISumoMinimapSinkInterface from Sumo Core and register the object with the map subsystem. Entries with bShowsOnMinimap then arrive as FSumoMinimapMarker. The interface is C++ only and has three pure virtual functions: AddMinimapMarker, RemoveMinimapMarker and SetBombMinimapState. The plugin never removes a ping marker itself, so drop each marker when the world time passes its ExpiryTime. Each ping marker has VisibilityRule set to TeamOnly and OwnerTeamID set to the sender’s team.

#include "Map/SumoMapSubsystem.h"
void UMyMinimapSubsystem::OnWorldBeginPlay(UWorld& World)
{
if (USumoMapSubsystem* Map = USumoMapSubsystem::Get(&World))
{
Map->RegisterMinimapSink(this);
}
}
FGuid UMyMinimapSubsystem::AddMinimapMarker(const FSumoMinimapMarker& Marker)
{
// Store and draw the marker until Marker.ExpiryTime.
// Return a handle for RemoveMinimapMarker.
}
void UMyMinimapSubsystem::RemoveMinimapMarker(const FGuid& Handle)
{
// Remove the marker with this handle.
}
void UMyMinimapSubsystem::SetBombMinimapState(const FVector& WorldLocation,
ESumoSpikeMinimapVisibility Visibility, uint8 AttackerTeamID)
{
// Not used by this plugin. Leave empty if your game has no bomb icon.
}

Play feedback when a ping is rejected for spam

Section titled “Play feedback when a ping is rejected for spam”

Set Spam Rejected Sound in the Comm Config for a sound. For HUD feedback:

Sumo Comm → On Ping Rejected (Reason) → Switch on ESumoPingRejectReason → your HUD: show message

  1. Create a Widget Blueprint with parent class Sumo Comm Wheel Widget.
  2. Add a Canvas Panel named SliceContainer.
  3. Optional: add an Image named WheelBackground and give its brush a material with the parameters NumSlices, HoveredSlice, HoverColor, InnerRadius and OuterRadius.
  4. Create a second Widget Blueprint with parent class Sumo Comm Wheel Slice Widget. Implement BP On Entry Set to show the icon and name, and BP On Hover Changed for the highlight.
  5. In the wheel widget’s class defaults, set Slice Widget Class to the slice widget.

Create and show the wheel from my own UI manager

Section titled “Create and show the wheel from my own UI manager”

Skip Open Wheel and call the widget directly:

Create Widget → Show For Definition (Definition, Sumo Comm) → your manager shows it

key released → Commit Selection → your manager hides it

Commit Selection and Cancel Wheel on the widget never hide or remove it. Cursor and input mode are yours to set.