Client Localized Message before Match Start

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

matw

New Member
Jul 9, 2003
40
0
0
Adelaide, South Australia
I am new to UnrealScript and can't locate a solution to a small problem with sending localized messages to clients before Match Start. I have spent time reading the latest UT2003 Source and I'm still missing it.

I am writing a Mutator and I want a player/client to receive a message via ReceiveLocalizedMessage() when they appear and are waiting to join, ie when they get the onscreen message "You are not ready..." (network client) or "Press fire to start" (single). I do not need to send this message on future re-spawns after deaths.

The best I can manage is overiding MatchStarting() and inserting Level.Game.BroadcastLocalizedMessage() which has the effect of sending everyone the message I want at once after the match has begun. I would prefer clients to receive the message when appear and enter the waiting state.

I did get ReceiveLocalizedMessage() to work once but the message still didn't appear till after the match has begun.

A big thankyou to anyone who can help me.
 

matw

New Member
Jul 9, 2003
40
0
0
Adelaide, South Australia
Well, I figured one way out of this very simply, but not technically what I wanted. (Like I said, I'm new to UnrealScript :) )

Code:
function PostBeginPlay()
{
	SetTimer(1.0, true);
}

function Timer()
{
	Level.Game.BroadcastLocalizedMessage(MessageClass, ...);
}

function MatchStarting()
{
	SetTimer(0, false);
}

It would have been nicer to actually have this message appear for each player when they enter the match or are waiting to start but this will do. So instead of doing a Broadcast, I would have wanted a ReceiveLocalizedMessage() per player.