View Full Version : Ok, next question :)
MudBlud
8th Mar 2002, 02:58 AM
i done some searching the smorning looking for how 2 get a message to appear in the middle of the screen and then fade out after X seconds.. i couldnt find anything :( anyone know how to do it? also, i only want it to appear on clients screen, not all of them.
Thanks in advance!!!
aspie
8th Mar 2002, 03:08 AM
this type of thing would be better handled with a HUD. I suggest you read the tutorials at http://www.unrealscript.com
Wormbo
8th Mar 2002, 04:44 AM
These things are LocalMessage/LocalMessagePlus subclasses.
Use BroadcastLocalizedMessage() to send them, MutatorBroadcastLocalizedMessage() to change them via a mutator and the pawn's ReceiveLocalizedMessage() to let only this one pawn see the message.
A single LocalMessage can look differently for different receivers(take Botpack.KillingSpreeMessage for example)
Yea Wormbo is right. I used one to denote my hill areas and send the messages to that clients PC:
class OnHillMessage expands LocalMessagePlus;
var(Messages) localized string OnHillString;
static function float GetOffset(int Switch, float YL, float ClipY )
{
return (Default.YPos/768.0) * ClipY - 2*YL;
}
static function string GetString(
optional int Switch,
optional PlayerReplicationInfo RelatedPRI_1,
optional PlayerReplicationInfo RelatedPRI_2,
optional Object OptionalObject
)
{
return Default.OnHillString;
}
static simulated function ClientReceive(
PlayerPawn P,
optional int Switch,
optional PlayerReplicationInfo RelatedPRI_1,
optional PlayerReplicationInfo RelatedPRI_2,
optional Object OptionalObject
)
{
Super.ClientReceive(P, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject);
}
defaultproperties
{
OnHillString="You are on the Hill!"
FontSize=1
bIsSpecial=True
bIsUnique=True
bFadeMessage=True
DrawColor=(G=0,B=0)
YPos=196.000000
bCenter=True
}
Dont forget to se bFadedMessage to true if you want it to fade :)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.