UE2:Object (UT2004): Difference between revisions
added descriptions |
m →GotoState: formatting fix: escaped empty name literal |
||
Line 203: | Line 203: | ||
'''Parameters:''' | '''Parameters:''' | ||
* ''NewState'' - The new state's name. If the empty name <code>''</code> was specified, the object will be in the null state after the switch and no BeginState() event is executed. The special name <code>'Auto'</code> is a synonym for the state with the ''auto'' modifier. This parameter defaults to the current state's name if omitted. | * ''NewState'' - The new state's name. If the empty name <code><nowiki>''</nowiki></code> was specified, the object will be in the null state after the switch and no BeginState() event is executed. The special name <code>'Auto'</code> is a synonym for the state with the ''auto'' modifier. This parameter defaults to the current state's name if omitted. | ||
* ''Label'' - The state label to begin state code execution at. Defaults to <code>'Begin'</code> if omitted. Unless the label was omitted, an invalid label name will generate a log warning. | * ''Label'' - The state label to begin state code execution at. Defaults to <code>'Begin'</code> if omitted. Unless the label was omitted, an invalid label name will generate a log warning. | ||
Latest revision as of 11:51, 5 December 2008
- Package:
- Core
- Direct subclasses:
- WebApplication, BrowserFilters, GUI, Actor, AdminBase, AnimEditProps, AnimNotifyProps, AnimNotify, Bitmap, BrushBuilder, CacheManager, CameraEffect, Canvas, ChallengeGame, CheatManager, Commandlet, CrosshairPack, CustomBotConfig, CustomFilter, CustomLadderInfo, DecoText, DrawOpBase, GameConfigSet, GameProfile, PlayerRecordClass, I3DL2Listener, Interactions, KarmaParamsCollision, LIPSincAnimProps, LIPSincControllerProps, LIPSincPrefsProps, LadderInfo, LevelSummary, ListItem, Locale, LogEntry, Manifest, MapVoteHistory, MaplistRecord, MatObject, MatchConfig, MatchInfo, MaterialFactory, Material, MeshObject, NotifyProperties, ONSPowerLinkCustomSetup, ObjectArray, ObjectPool, Palette, ParticleEmitter, PlayInfo, PlayerInput, Player, PropertyManagerBase, ReachSpec, Resource, RosterEntry, SPHighScoreBase, SPProfileExporter, SVehicleWheel, ScriptedAction, SequEditProps, SkaarjMeshes, SkelPrefsEditProps, Sound, SpeciesType, Spline, StreamBase, StringArray, Subsystem, TextToSpeechAlias, Time, UT2K4RosterGroup, WeaponFire, WebRequest, WebResponse, WebSkin, XAdminBase, XPawnGibGroup, XPawnSoundGroup, XPrivilegeBase, XUtil, Primitive, Factory, Font, MeshAnimation
- Known custom subclasses:
- Crusha/UltimateMappingTools, Crusha/UltimateMappingTools/UltimateMathAux
- This class in other games:
The base class all objects. Because all other classes directly or indirectly inherit from the Object class, all constants, enums, structs, functions and operators defined here could be called "global" constants, enums, etc.
Constants
RF_Transactional
Value: 0x00000001
Supports editor undo/redo.
RF_Public
Value: 0x00000004
Can be referenced by external package files.
RF_Transient
Value: 0x00004000
Can't be saved or loaded.
RF_Standalone
Value: 0x00080000
Keep object around for editing even if unreferenced.
RF_NotForClient
Value: 0x00100000
Don't load for game client.
RF_NotForServer
Value: 0x00200000
Don't load for game server.
RF_NotForEdit
Value: 0x00400000
Don't load for editor.
MaxInt
Value: 0x7fffffff
Maximum possible int value in UnrealScript. The minimum possible int value is 0x80000000 or ~MaxInt
. (That's a tilde, the bitwise complement operator.)
Pi
Value: 3.1415926535897932
The closest approximation of Pi that fits into UnrealScript's float type.
Properties
Property group 'Object'
Name
Type: name
Modifiers: native, const, editconst, noexport
The name of this object. An object's name is defined when the object is created and it's impossible to change later at runtime.
Internal variables
Class
Type: Class
Modifiers: native, const, editconst
The class of this object.
ObjectFlags
Type: int
Modifiers: native, const
Internal flags of this object.
ObjectInternal
Type: pointer
Array size: 7
Modifiers: native, private, const
Other internal data for this object.
Outer
Type: Object
Modifiers: native, const
The outer object containing this object. For resources like Textures this is usually the package or group, for Actors this is usually the map package of the level currently being played.
Enums
EAxis
Coordinate axes.
- AXIS_X
- The X axis.
- AXIS_Y
- The Y axis.
- AXIS_Z
- The Z axis.
ECamOrientation
Camera orientations.
- CAMORIENT_None
- CAMORIENT_LookAtActor
- CAMORIENT_FacePath
- CAMORIENT_Interpolate
- CAMORIENT_Dolly
EDetailMode
World and physics detail modes.
- DM_Low
- Low detail.
- DM_High
- Normal detail.
- DM_SuperHigh
- Highest detail.
EDrawPivot
Draw pivot positions, e.g. for aligning text or materials.
- DP_UpperLeft
- Upper left corner.
- DP_UpperMiddle
- Center of upper side.
- DP_UpperRight
- Upper right corner.
- DP_MiddleRight
- Center of right side.
- DP_LowerRight
- Lower right corner.
- DP_LowerMiddle
- Center of lower side.
- DP_LowerLeft
- Lower left corner.
- DP_MiddleLeft
- Center of left side.
- DP_MiddleMiddle
- Center of entire object.
ESheerAxis
- SHEER_None
- SHEER_XY
- SHEER_XZ
- SHEER_YX
- SHEER_YZ
- SHEER_ZX
- SHEER_ZY
Structs
See Object structs.
Functions
Static native functions
See Object static native functions.
Other static functions
EatStr
Removes Num characters from the start of Source and appends them to Dest. If the source string contains less than the specified number of characters, all of them are appended to the destination string.
GetItemName
Returns the last part of a dot-separated full object name.
Note that GetItemName(string(SomeObjectReference))
is the same as string(SomeObjectReference.Name)
, as long as the object reference is not None.
ReplaceText
Modifies Text by replacing every occurrences of Replace with With. Only occurrences in the original text are replaced, additional occurrences created as a result of a replacement are ignored.
Iterator functions
AllObjects
Iterates over the engine's internal object list and returns all objects of the specified class and all of its subclasses.
Note: This iterator is much more expensive than AllActors. Use it only when you have no other choice and select the base class very carefully.
Native functions
ClearConfig
Clears the entire config section or only the configuration for the specified property and reloads the default value. For PerObjectConfig classes, only the config section for this object is cleared. Globalconfig properties are not affected unless they are declared in this object's class.
Disable
Disables the specified probe function. Invalid names, including names of non-probe functions, will generate a log warning.
Enable
Enables the specified probe function. Invalid names, including names of non-probe functions, will generate a log warning.
GetPropertyText
Returns the value of the specified property as a string. The result may differ from the value typecasted to string. Especially arrays and all kinds of structs can be converted to a string representation. This function will return an empty string if the specified property doesn't exist or is not public.
GetReferencers
Builds a list of objects referencing the specified object.
GetStateName
Returns the name of the object's current state.
GotoState
Switches to a new state and optionally starts executing that state's state code at the specified label. If the object previously was in a state, that state's EndState() event is called right before the state switch. If a valid NewState name was specified, that new state's BeginState() event is called right after the state switch.
Parameters:
- NewState - The new state's name. If the empty name
''
was specified, the object will be in the null state after the switch and no BeginState() event is executed. The special name'Auto'
is a synonym for the state with the auto modifier. This parameter defaults to the current state's name if omitted. - Label - The state label to begin state code execution at. Defaults to
'Begin'
if omitted. Unless the label was omitted, an invalid label name will generate a log warning.
IsA
Returns True if the object's Class name equals ClassName or if the object's class directly or indirectly extends a class with that name.
IsInState
Returns True if the object's current state's name equals TestState or if the current state directly or indirectly extends a parent state with that name.
IsOnConsole
Returns True if the game runs on a console platform, e.g. Xbox.
IsSoaking
PlatformIs64Bit
Returns True if the game runs through its 64bit binaries. With 32bit game binaries this function always returns False, even if the underlying operating system and hardware are 64bit.
PlatformIsMacOS
Returns True if the game runs under MacOS.
PlatformIsUnix
Returns True if the game runs on a 32bit or 64bit Unix platform, e.g. Linux.
PlatformIsWindows
Returns True if the game runs on a 32bit or 64bit Windows platform.
SaveConfig
Saves this objects configurable properties. For PerObjectConfig classes, the values of configurable properties are written to a separate section labeled with this object's name and its class name. For other classes, the values of configurable properties are written to the object's class config section and also become the class default values. Values of globalconfig properties are written to the config section of the class that declared the property.
SetPropertyText
Sets the value of the specified property. The format of the PropValue is similar to the return value of the GetPropertyText() function. If the specfied property doesn't exist, is declared with the const modifier or not public, no new value is assigned. SetPropertyText() will return False in this case.
Note that the return value True does not automatically mean that a valid new value was assigned to the property. An invalidly formatted value string could have unpredictable results. Depending on the type of property, nothing could happen at all, a null value may be assigned or even only a partial value, especially for struct properties.
Events
BeginState
Called for the new state right after the state switch before GotoState() returns.
Created
Called for non-Actor objects right before the new operator returns.
EndState
Called for the old state right before the state switch during GotoState().
Other instance functions
RandRange
Returns a random float value between Min and Max. Since this is an instance functions, you will have to use FRand() to generate the desired range of values: <uscript>Min + (Max - Min) * FRand()</uscript>
Operators
See Object operators.