unrealwiki:Scratchpad

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:34, 24 April 2008 by Shambler (talk | contribs)

This page is for pasting code you want to show someone as an example or to get assistance with. This allows you to easily collaborate with someone to solve a problem, and allows easy comparisons of the edits.

You are free to remove any existing code from below, and paste your code between the <uscript> </uscript> tags. If the page hasn't been edited in 24 hours, you can assume it isn't needed anymore and can be removed. A full edit history will be available, so don't worry about losing anything.


<uscript> function Mutate(string MutateString, PlayerController Sender) { local AIController AC; local int RawBotCount;

if (Master == none || Sender == none) { Super.Mutate(MutateString, Sender); return; }

if (MutateString ~= "TTFVersion") { Sender.ClientMessage("Running TitanTeamFix version:"@TTFVersion); } else if (MutateString ~= "TTFDebug") { Sender.ClientMessage("Team 0 size:"@WorldInfo.Game.GameReplicationInfo.Teams[0].Size$", Team 1 size:"@WorldInfo.Game.GameReplicationInfo.Teams[1].Size); } else if (MutateString ~= "TTFPlayerCount") { foreach WorldInfo.AllControllers(Class'AIController', AC) ++RawBotCount;

Sender.ClientMessage("DesiredPlayerCount (i.e. MinPlayers):"@UTGame(WorldInfo.Game).DesiredPlayerCount$", NumPlayers:"@WorldInfo.Game.NumPlayers$", NumBots:"@WorldInfo.Game.NumBots); Sender.ClientMessage("RawBotCount:"@RawBotCount$", NumTravellingPlayers:"@WorldInfo.Game.NumTravellingPlayers); } else { Super.Mutate(MutateString, Sender); } } </uscript>