Pings

Modules PulsePing (the rules and the network part, depends on PulseFoundation only) and PulsePingUI (the ping key, the radial menu and the markers, depends on PulseHUD). A player points at something and pings it: its team sees a marker on the compass, on the screen and on the maps for a few seconds. A short press of the ping key pings a place, holding it opens a radial menu with the ping types (place, enemy, item, danger).

Overview

Type What it is
UPulsePingComponent On the player controller: traces from the crosshair, sends the request to the server, receives the pings of its team
FPulsePing One ping as plain data: sender id and name, team, type, place, target, end on the server clock
FPulsePingType A ping type in the settings: tag, name, lifetime, whether the marker follows the target
UPulsePingSettings Project Settings > Pulse > Core > Ping: types, rate limit, reach
UPulsePingUISubsystem Local player: the ping key, the radial menu, one HUD marker per ping
UPulsePingUISettings Project Settings > Pulse > Core > Ping UI: icon and color per type, marker options, input
UPulseRadialMenuWidget Pulse Radial Menu of PulseHUD, see Radial menu

Setup

  1. Turn on the automatic Ping Component in Project Settings > Pulse > Core > Ping (or with the setup step “Ping” in the Pulse window). It goes on every player controller.
  2. The Pulse HUD has to be on (bEnableHUD) for the markers and the radial menu. The markers use AddMarker of the HUD, so they show wherever the layout has a compass, a world marker layer or a map.
  3. Teams come from Pulse Foundation (Pulse::Team, e.g. a Pulse Team Component on the player state). Players without team see only their own pings.

The ping key is the input action IA_PulsePing with the mapping context IMC_PulsePing (middle mouse button, D-pad up), both in /PulseCore/Ping/Input (built by Tools/make_ping_input.py). The subsystem adds the context for every local player; set Ping Mapping Context to none when the game maps the action itself, or turn off Enable Ping Input and call Ping Now and Open Ping Menu from your own input.

How a ping travels

Everything a rule decides is a pure function in Pulse::Ping (PulsePingTypes.h), tested without a world (specs PulsePing.Rules):

Function What it does
CheckRequest A type the settings know, a place within reach of the sender
CheckRate / RecordSent The rate limit: a minimum interval and at most MaxPings within Window seconds
MakePing The ping of a checked request: sender, team, end on the server clock
GetReceivers The sender and the players of its team
AddPing The list of a receiver: the same ping replaces itself, a sender keeps at most MaxPingsPerPlayer
RemoveExpired / GetNextExpiry Pings whose time is up; the end of the next one for the timer
  1. Request (owning client): PingAtCrosshair traces along the view of the player (MaxDistance, TraceChannel) and calls RequestPing. A client sends a server RPC with a request id of the Pulse request subsystem.
  2. Check (server): TryPing checks the request and the rate first and answers a refusal with an FPulseResult (Pulse.Result.Failure.Ping.*). Nothing changes on a refusal.
  3. Send (server): it records the rate, makes the ping and sends the same FPulsePing by client RPC to every receiver. There is no replicated property and nothing is saved.
  4. Show (receivers): the component keeps the ping until it expires (a timer of the Pulse clock subsystem), the ping UI turns it into a HUD marker and removes the marker with it.

Pings live on the server clock: the same time on every machine, and a paused game does not keep them on the screen. A refused ping shows its reason as a HUD notification (Show Refusals).

Radial menu and key

  • Press and let go before Menu Hold Time (0.25 s): a ping of the Default Type (place).
  • Hold: the radial menu opens with one entry per type (Pulse::PingUI::BuildMenu). The place is the one under the crosshair when it opened. Point with the mouse or the stick; letting go of the ping key, a click or the accept button pings that type. Escape or the right mouse button closes it without a ping.

While the menu is open the game gets no input (UI only), so a Slate input processor sees the release of the ping key.

Markers

Pulse::PingUI::MakeMarkerData builds the marker of a ping (specs PulsePing.UI): the icon and color of its type (Type Looks, a parent tag covers its children), the name of the type and the sender (“Enemy (Alex)”, not for the own pings), the distance, always on the compass and the screen edge. Types with Track Target (enemy) follow the actor that was hit. Marker Targets chooses compass, screen and maps.

Messages

Channel Payload Context
Pulse.Message.Ping.Sent FPulsePing player: the sender’s controller, target: the pinged actor, tags: the type, amount: the receivers

It comes from the server.

Blueprint and C++

Function Where What it does
Find Ping Component any The ping component of a controller, pawn or player state
Ping At Crosshair owning client Traces and asks the server for a ping of a type
Request Ping owning client or server Asks for a ping with your own place and target
Try Ping server Checks and sends a ping, returns the result
Get Pings, Clear Pings the player’s machine The pings this player sees
On Ping Added, On Ping Removed events A ping arrived; expired, replaced or pushed out
Ping Now, Open Ping Menu, Close Ping Menu Ping UI subsystem What the ping key does

Settings

Setting Default Description
Types Location, Enemy, Item, Danger The ping types, in the order of the radial menu
DefaultType Pulse.Ping.Type.Location Type of a quick ping
DefaultLifetime 10 s Lifetime of types without one of their own
MaxPingsPerPlayer 2 Pings of one sender a receiver keeps at once
RateLimit 3 in 5 s, 0.25 s apart How often a player may ping
MaxDistance 150 m Length of the trace and reach the server accepts
DistanceTolerance 10 m Extra reach the server accepts
TraceChannel Visibility Channel of the crosshair trace
PingComponent off Automatic ping component on every player controller
TypeLooks (Ping UI) icons and colors of the four types Icon and color role per type
MarkerOptions (Ping UI) distance and sender name What the markers show
MarkerTargets (Ping UI) compass, screen, maps Where the pings show
bShowRefusals (Ping UI) true A refused ping shows its reason
bEnablePingInput (Ping UI) true The ping key pings and opens the menu
PingInputAction, PingMappingContext (Ping UI) IA_PulsePing, IMC_PulsePing The ping key
MenuHoldTime (Ping UI) 0.25 s Hold time before the radial menu opens
RadialMenuClass, RadialMenuStack (Ping UI) UPulseRadialMenuWidget, main stack The radial menu

Example

Play the PulseCore example map with a listen server and a client, then PulseCoreGrant on both (it calls PulsePingGrant). The middle mouse button pings, holding it opens the radial menu. PulsePing Enemy pings by cheat; the other player sees the marker. PulseRespawnTeam Enemy on one player puts it in another team: its pings stay its own. PulsePingBurst 5 shows the rate limit.

Cheats

See Console.


PulseCore plugin documentation.

This site uses Just the Docs, a documentation theme for Jekyll.