My program doesn't have bugs. It just develops random features.

Difference between revisions of "Defaultproperties"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(stub for now, will continue tomorrow)
(No difference)

Revision as of 15:58, 11 April 2008

The defaultproperties block is a special section in an UnrealScript class source file. It can define or redefine default values for all properties declared in the class or inherited from a parent class. Like cpptext blocks, the defaultproperties block is stripped from the source when the class source is imported by the UnrealScript compiler. This means you can neither see nor specify it in the Source code editor of UnrealEd versions coming with Unreal Engine generations 1 and 2.

To edit default values of a class from within UnrealEd, go to the Actor Classes browser, find and right-click the class in the tree and select "Default properties..." in the pop-up menu. A window titled "Default Packagename.Classname Properties" similar to the Actor Properties window will open and allow you to change most of the default values. As with the Actor Properties window, what exactly you are allowed to change depends on the declaration of the corresponding variables.

Note: All script-editing capabilities have been removed from the Unreal Engine 3 Unreal Editor. This includes editing default values. Instead, you can create Archetypes, but only for non-abstract, placeable Actor classes.

Syntax

defaultproperties
{
  [default value]
  [default value]
  ...
}

The keyword defaultproperties and the braces must each be on their own line. The default values are separated by line breaks and are not regular UnrealScript code. Instead they are similar to the format of T3D files.