1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Ok, next question :)

Discussion in 'Programming' started by MudBlud, Mar 8, 2002.

  1. MudBlud

    MudBlud New Member

    Joined:
    Mar 7, 2002
    Messages:
    21
    Likes Received:
    0
    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!!!
     
  2. aspie

    aspie It's all good baby.

    Joined:
    Feb 24, 2001
    Messages:
    315
    Likes Received:
    0
  3. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,913
    Likes Received:
    36
    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)
     
  4. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    Yea Wormbo is right. I used one to denote my hill areas and send the messages to that clients PC:


    Code:
    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 :)
     

Share This Page