PDA

View Full Version : Unreal Script Reference Manual?



CaptainSnarf
12-14-2007, 12:53 PM
I found these docs:
http://unreal.epicgames.com/UnrealScript.htm
http://udn.epicgames.com/Three/UnrealScriptReference.html

Unfortunately the first says "Last Updated: 12/21/98". The second is missing some basic info.

Here's a sample mutator:



class MultiJump extends UTMutator Config(Game);


var() config int iMaxNumJumps;
var() config int iMaxJumpBoost;

function ModifyPlayer(Pawn P)
{
if ( UTPawn(P) != None )
{
// Increase the number of times a player can jump in mid air
UTPawn(P).MaxMultiJump = iMaxNumJumps;
UTPawn(P).MultiJumpRemaining = iMaxNumJumps;

// Also increase a bit the amount they jump each time
UTPawn(P).MultiJumpBoost = iMaxJumpBoost;

}
Super.ModifyPlayer(P);
}

defaultproperties
{
bExportMenuData=False
GroupNames(0)="MULTIJUMP"
Begin Object Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTMutato r:Sprite'
ObjectArchetype=SpriteComponent'UTGame.Default__UT Mutator:Sprite'
End Object
Components(0)=Sprite
Name="Default__MultiJump"
}


Is there any documentation for the "Begin Object" line? What are all the parameters? Name vs ObjName? Archetype? ObjectArchetype? I can make educated guesses about this stuff but some docs would be nice! :) wtf is archetype!!? Why does the exported script also include a 'Class=' parameter in the Begin Object lines, but the Class= must be removed in order for it to compile? Help! :D

Mr Evil
12-14-2007, 02:19 PM
The Unreal Wiki is a good place to look for UScript info. It doesn't have much UT3 specific information yet, but it's always being updated (and of course you can update it too). It has a page on subobjects (http://wiki.beyondunreal.com/wiki/Subobject) (the "Begin Object" stuff).

You might also find info from pages devoted to other UE3 games, e.g. the RoboBlitz Editor Wiki has a page on archetypes (http://www.roboblitz.com/RoboBlitzEditorWiki/index.php/Archetype).

CaptainSnarf
12-14-2007, 03:01 PM
awesome! thanks for the links

Gugi
12-14-2007, 03:03 PM
The GroupNames, Begin Object, Components and Name-thingys are more or less garbage.
You don't need to include those in your custom classes, I guess they are added automatically by the compiler.

You can download the "clean" scripts directly from EPIC on UDN (http://udn.epicgames.com/Three/UT3Mods.html#UnrealScript%20Source%20Files).

Wormbo
12-14-2007, 04:22 PM
Actually, GroupNames is not garmage at all. You can use it to make sure player's and admins don't attempt to combine incompatible mutators. I aggree on the Name and SpriteComponent part, though. Setting a Name in defaultproperties might actually break things, so don't do it!

Pfhoenix
12-14-2007, 09:22 PM
Components are hardly garbage. They're how Actors work now. Name for subobjects are important as well for unique identification.

Gugi
12-15-2007, 05:07 AM
xD Of course, the GroupNames aren't garbage. Sorry :rolleyes: