I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Difference between revisions of "Unreal Wiki:Scratchpad"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
 
(56 intermediate revisions by 12 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
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.
 
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 <nowiki><uscript> </uscript></nowiki> 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 <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=history}} edit history]</span> will be available, so don't worry about losing anything.
+
You are free to remove any existing code from below, and paste your code between the <nowiki><uscript> </uscript></nowiki> tags.  If the page hasn't been edited in the last few hours (the last edit timestamp is {{timestamp}}), you can assume it isn't needed anymore and can be removed.  A full <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=history}} edit history]</span> will be available, so don't worry about losing anything you removed.
  
 +
'''Clean up after you're done!'''
 
----
 
----
  
 
<uscript>
 
<uscript>
function Mutate(string MutateString, PlayerController Sender)
+
// paste your code here
{
+
</uscript>
local AIController AC;
+
local int RawBotCount;
+
  
if (Master == none || Sender == none)
+
====Full Key====
{
+
* <sup>1</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 1]].
Super.Mutate(MutateString, Sender);
+
* <sup>2</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 2]].
return;
+
* <sup>2+</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 2]], from this version onwards.
}
+
* <sup>2x</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 2]], starting with [[UT2004]].
 
+
* <sup>3</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 3]].
if (MutateString ~= "TTFVersion")
+
* <sup>3+</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 3]], starting with [[UT3]] patch 2.0.
{
+
* <sup>3*</sup> &ndash; {'''$Topic''' is relevant/available to/in} [[Unreal Engine 3]], starting with [[UDK]].
Sender.ClientMessage("Running TitanTeamFix version:"@TTFVersion);
+
* (no number) &ndash; {'''$Topic''' is relevant/available to/in} all Unreal Engine generations.
}
+
<br>
else if (MutateString ~= "TTFDebug")
+
====Enum Key====
{
+
{{classgames|Vector}}<sup>--|</sup><br>
Sender.ClientMessage("Team 0 size:"@WorldInfo.Game.GameReplicationInfo.Teams[0].Size$", Team 1 size:"@WorldInfo.Game.GameReplicationInfo.Teams[1].Size);
+
{{classgames|Range}}<sup>--|'''2'''</sup><br>
}
+
{{classgames|Vector2D}}<sup>--|'''3'''</sup><br>
else if (MutateString ~= "TTFPlayerCount")
+
{{classgames|Color}}<br>
{
+
{{classgames|LinearColor}}<br>
foreach WorldInfo.AllControllers(Class'AIController', AC)
+
<br>
++RawBotCount;
+
====Class Key====
 
+
{{classgames|Actor}}<br>
Sender.ClientMessage("DesiredPlayerCount (i.e. MinPlayers):"@UTGame(WorldInfo.Game).DesiredPlayerCount$", NumPlayers:"@WorldInfo.Game.NumPlayers$", NumBots:"@WorldInfo.Game.NumBots);
+
{{classgames|Rook}}<br> - TribesV?
Sender.ClientMessage("RawBotCount:"@RawBotCount$", NumTravellingPlayers:"@WorldInfo.Game.NumTravellingPlayers);
+
{{classgames|SoundCue}}<br>
}
+
{{classgames|UTGreedGame}}<br>
else
+
{{classgames|LegendObjectComponent}}<br>
{
+
{{classgames|FluidSurfaceOscillator}}<br>
Super.Mutate(MutateString, Sender);
+
{{classgames|Ammunition}}<br>
}
+
{{classgames|Util}}<br>
}
+
{{classgames|xUtil}} -UE2??<br>
</uscript>
+
{{classgames|UnrealPlayer}}<br>
 +
{{classgames|xPlayer}} -UE2??<br>
 +
{{classgames|UTPlayerController}}<br>
 +
{{classgames|WeaponFire}}
 +
<br>
 +
====Keyword Key====
 +
{{classgames|Expands}}<br>
 +
{{classgames|Extends}}<br>
 +
{{classgames|server}}<br>
 +
{{classgames|replicated}}<br>
 +
{{classgames|intrinsic}}<br>

Latest revision as of 08:41, 6 October 2011

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 the last few hours (the last edit timestamp is 2011-10-06 08:41:16), 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 you removed.

Clean up after you're done!


// paste your code here

Full Key[edit]

  • 1 – {$Topic is relevant/available to/in} Unreal Engine 1.
  • 2 – {$Topic is relevant/available to/in} Unreal Engine 2.
  • 2+ – {$Topic is relevant/available to/in} Unreal Engine 2, from this version onwards.
  • 2x – {$Topic is relevant/available to/in} Unreal Engine 2, starting with UT2004.
  • 3 – {$Topic is relevant/available to/in} Unreal Engine 3.
  • 3+ – {$Topic is relevant/available to/in} Unreal Engine 3, starting with UT3 patch 2.0.
  • 3* – {$Topic is relevant/available to/in} Unreal Engine 3, starting with UDK.
  • (no number) – {$Topic is relevant/available to/in} all Unreal Engine generations.


Enum Key[edit]

Vector(RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UDK, UT3)--|
Range(U2, U2XMP, UE2Runtime, UT2003, UT2004)--|2
Vector2D(UDK, UT3)--|3
Color(RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UDK, UT3)
LinearColor(UDK, UT3)

Class Key[edit]

Actor(RTNP, U1, UT, U2, U2XMP, UE2Runtime, UT2003, UT2004, UDK, UT3)
Rook(no matching games found)
- TribesV? SoundCue(UDK, UT3)
UTGreedGame(UT3)
LegendObjectComponent(U2XMP)
FluidSurfaceOscillator(U2, U2XMP, UE2Runtime, UT2003, UT2004)
Ammunition(U2XMP, UE2Runtime, UT2003, UT2004)
Util(U2, U2XMP)
xUtil(no matching games found) -UE2??
UnrealPlayer(UT2003, UT2004)
xPlayer(no matching games found) -UE2??
UTPlayerController(UDK, UT3)
WeaponFire(UT2003, UT2004)

Keyword Key[edit]

Expands(no matching games found)
Extends(no matching games found)
server(no matching games found)
replicated(no matching games found)
intrinsic(no matching games found)