User Tag List

Results 1 to 6 of 6
  1. #1
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:

    Build messages storing, light version.

    Writing this from a toaster filled with viruses, just as reminder for myself to copy/paste later.


    Code:
    // Short build message storing on connected clients, should display on SiegeStats below the rankings
    // Useful for quick screenshots, improves moderation and teamwork, encourages usage of SiegeStats
    class sgClientBuildMessages expands Info;
    
    var string sHistory[16];
    var PlayerPawn LocalPlayer;
    
    replication
    {
    	reliable if ( Role == ROLE_Authority)
    		ReceiveMessage;
    }
    
    simulated event PostBeginPlay()
    {
    	if ( Level.NetMode != NM_DedicatedServer )
    		SetTimer(2, false);
    }
    
    simulated event Timer()
    {
    	local playerPawn P;
    	ForEach AllActors (class'PlayerPawn',P)
    		if ( ViewPort(P.Player) != none )
    		{	LocalPlayer = P;
    			return;
    		}
    	Destroy(); //Why would a client have no player?
    }
    
    simulated function ReceiveMessage( string sMsg, int Team, bool bAnnounce)
    {
    	local int i;
    	if ( (Spectator(LocalPlayer) == none) && (LocalPlayer.PlayerReplicationInfo.Team != Team) )
    		return; //Only store messages on spectators and same team players
    	For ( i=ArrayCount(sHistory) ; i>0 ; i-- )
    		sHistory[i] = sHistory[i-1]; //Push up
    	sHistory[0] = sMsg;
    	if ( bAnnounce )
    		LocalPlayer.ClientMessage("-== "$sMsg$" ==-");
    }
    
    defaultproperties
    {
          bAlwaysRelevant=True
          RemoteRole=ROLE_SimulatedProxy
    }
    ------------------------------------- * -------------------------------------

  2. #2
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:
    Add to SiegeGI...


    Code:
    var sgClientBuildMessages ClientBuildM;
    
    //on InitGame:
    	ClientBuildM = Spawn( class'sgClientBuildMessages');
    
    //on BuildingCreated( sgBuilding sgNew)
    	if ( sgNew.Owner != none )
    		ClientBuildM.ReceiveMessage( Pawn(sgNew.Owner).PlayerReplicationInfo.PlayerName @"built a"@sgNew.BuildingName, Pawn(sgNew.Owner).PlayerReplicationInfo.Team, false);
    
    function BuildingRemoved( sgBuilding sgRem, pawn Remover)
    {
    	if ( sgNew.Owner != none )
    		ClientBuildM.ReceiveMessage( Pawn(sgNew.Owner).PlayerReplicationInfo.PlayerName @"'s"@sgNew.BuildingName @ "has been removed by" @ Remover.PlayerReplicationInfo.PlayerName, Remover.PlayerReplicationInfo.Team, true);
    	else
    		ClientBuildM.ReceiveMessage( "A"@sgNew.BuildingName @ "has been removed by" @ Remover.PlayerReplicationInfo.PlayerName, Remover.PlayerReplicationInfo.Team, true);
    }
    That's just a basic model, a localized one would be significantly different.


    Add to sgBuilding:
    Code:
    //on RemovedBy( pawn Remover) //I added this case to sgBuilding on RC15
    	SiegeGI(Level.Game).BuildingRemoved( self, Remover);
    ------------------------------------- * -------------------------------------

  3. #3
    Administrator SAM's Avatar
    Join Date
    Jan 2011
    Posts
    8,234
    Country:
    Global announce for remove please! Even better would be call nexgen detect moderator or higher and announce to them explicitally

    however in doing that would make it difficult for pub players to report so global announce would be best way to go.

  4. #4
    Moderator .seVered.]['s Avatar
    Join Date
    Jun 2011
    Location
    Near a River and Under a Bridge
    Posts
    2,122
    Country:
    Quote Originally Posted by SAM View Post
    Global announce for remove please! Even better would be call nexgen detect moderator or higher and announce to them explicitally

    however in doing that would make it difficult for pub players to report so global announce would be best way to go.
    With an AUDIBLE alert for the Kick message? Perhaps a Car Horn or something like that.

    and a simple adjustment to the the remove message would make it easier to find in the log.

    sgConstructor.uc, Case 2 // Remove Mode

    Code:
    {
    	sMessage=">>  Player  >>"@Pawn(Owner)[email protected]" has been warned for Team Removing.";
    	AnnounceAll(sMessage);
    }

  5. #5
    Dominating Disturbed//*.'s Avatar
    Join Date
    Jan 2011
    Posts
    608
    Country:
    I have no idea what all them dang codes, So another words, what is this?

  6. #6
    Moderator .seVered.]['s Avatar
    Join Date
    Jun 2011
    Location
    Near a River and Under a Bridge
    Posts
    2,122
    Country:
    Quote Originally Posted by Disturbed//*. View Post
    I have no idea what all them dang codes, So another words, what is this?
    Build Message and Warning's would be posted to this list and available on the F3 key, along with other useful information about the match.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CTF messages
    By UT-Sniper-SJA94 in forum Unreal Tournament Chit Chat
    Replies: 4
    Last Post: 03-24-2015, 11:22 AM
  2. Is this is a good build? (PC Gaming Build)
    By Disturbed//*. in forum Unreal Tournament Chit Chat
    Replies: 3
    Last Post: 06-16-2014, 04:36 PM
  3. Build up of Lag
    By (bO.o)b in forum Technical Problems
    Replies: 8
    Last Post: 11-14-2013, 01:17 AM
  4. Is there a very dowload light siege I can download?
    By Moko in forum General Discussion
    Replies: 8
    Last Post: 07-27-2012, 06:01 PM
  5. When noobs build... You ve got to do something.. right ?
    By |uK|Chronox in forum Screenshots
    Replies: 8
    Last Post: 02-24-2011, 04:22 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •