Chemeric Home

  Reference
Material to look stuff up in.

  UnrealScript
That lovely java cum C++ language

  A Look at Mods
You wanted work in progress - and here it is

  Bots
Custom bots & configurations

  Misc
Stuff we can't place easily :-)

  Contributors
The guys and gals of Chimeric

 

The Object Class

Written by Valiant - 11 June 1998


Copyright

Unreal™ © 1998 Epic Megagames, Inc. All Rights Reserved.


Version Information

Based upon Unreal Version 1.0. Please send comments to Valiant.

Class Definition

class Object
    intrinsic;

Serves as the base class of all objects in Unreal.

Data Members

ObjectInternal
var intrinsic private const int ObjectInternal[6];
???

Parent
var intrinsic const parent;
The object's parent object, used for scoping purposes.

ObjectFlags
var intrinsic const int ObjectFlags;
The object's flags, described in the package documentation.

Name
var(object) intrinsic const editconst name Name;
The object's name.

Class
var(object) intrinsic const editconst class Class;
The object's class name.

Class Structure Definitions

BoundingBox
struct BoundingBox
{
var vector Min, Max;
var byte IsValid;
};

A bounding box, used for collision purposes.

BoundingVolume
struct BoundingVolume expands boundingbox
{
var plane Sphere;
};

A bounding box sphere together, used for collision purposes.

Color
struct Color
{
var() config byte R, G, B, A;
};

A color value structure.

Coords
struct Coords
{
var() config vector Origin, XAxis, YAxis, ZAxis;
};

An arbitrary coordinate system in 3d space.

DynamicArray
struct DynamicArray
{
var const int Num, Max, Ptr;
};
A dynamic array.

DynamicString
struct DynamicString
{
};

A dynamic string.

Guid
struct Guid
{
var int A, B, C, D;
};

A globally unique identifier
.

Plane
struct Plane expands Vector
{
var() config float W;
};

A plane definition in 3d space.

Rotator
struct Rotator
{
var() config int Pitch, Yaw, Roll;
};

An orthogonal rotation in 3d space.

Scale
struct Scale
{
var() config vector Scale;
var() config float SheerRate;
var() config enum ESheerAxis
    {
    SHEER_None,
    SHEER_XY,
    SHEER_XZ,
    SHEER_YX,
    SHEER_YZ,
    SHEER_ZX,
    SHEER_ZY,
    } SheerAxis;
};

Structure used for scaling and sheering.

Vector
struct Vector
{
var() config float X, Y, Z;
};

A point or direction vector in 3d space.

Class Constants

MaxInt
const MaxInt = 0x7fffffff;
Value of the maximum integer.

Pi
const Pi = 3.1415926535897932;
Value used for PI.

Class Intrinsic Operators and Functions

Bool Operators

!
intrinsic(129) static final preoperator bool ! ( bool A );
Logical negation operator

==
intrinsic(242) static final operator(24) bool == ( bool A, bool B );
Equality operator

!=
intrinsic(243) static final operator(26) bool != ( bool A, bool B );
Inequality operator

&&
intrinsic(130) static final operator(30) bool && ( bool A, skip bool B );
Logical AND operator

^^
intrinsic(131) static final operator(30) bool ^^ ( bool A, bool B );
??? if you know please email me the answer, TIA, Valiant

||
intrinsic(132) static final operator(32) bool || ( bool A, skip bool B );
Logical OR operator

Byte Operators

*=
intrinsic(133) static final operator(34) byte *= ( out byte A, byte B );
Multiplication operator

/=
intrinsic(134) static final operator(34) byte /= ( out byte A, byte B );
Division operator

+=
intrinsic(135) static final operator(34) byte += ( out byte A, byte B );
Addition operator

-=
intrinsic(136) static final operator(34) byte -= ( out byte A, byte B );
Subtraction operator

++
intrinsic(137) static final preoperator byte ++ ( out byte A );
Increment preoperator

--
intrinsic(138) static final preoperator byte -- ( out byte A );
Decrement preoperator

++
intrinsic(139) static final postoperator byte ++ ( out byte A );
Increment postoperator

--
intrinsic(140) static final postoperator byte -- ( out byte A );
Increment postoperator

Integer operators

~
intrinsic(141) static final preoperator int ~ ( int A );
One’s complement operator

-
intrinsic(143) static final preoperator int - ( int A );
Unary minus operator

*
intrinsic(144) static final operator(16) int * ( int A, int B );
Multiplication operator

/
intrinsic(145) static final operator(16) int / ( int A, int B );
Division operator

+
intrinsic(146) static final operator(20) int + ( int A, int B );
Addition operator

-
intrinsic(147) static final operator(20) int - ( int A, int B );
Subtraction operator

<<
intrinsic(148) static final operator(22) int << ( int A, int B );
Left shift operator, or, for vectors, forward vector transformation

>>
intrinsic(149) static final operator(22) int >> ( int A, int B );
Right shift operator, or, for vectors, reverse vector transformation

<
intrinsic(150) static final operator(24) bool < ( int A, int B );
Less than operator

>
intrinsic(151) static final operator(24) bool > ( int A, int B );
Greater than operator

<=
intrinsic(152) static final operator(24) bool <= ( int A, int B );
Less or equal operator

>=
intrinsic(153) static final operator(24) bool >= ( int A, int B );
Greater or equal operator

==
intrinsic(154) static final operator(24) bool == ( int A, int B );
Equality operator

!=
intrinsic(155) static final operator(26) bool != ( int A, int B );
Inequality operator

&
intrinsic(156) static final operator(28) int & ( int A, int B );
Bitwise AND operator

^
intrinsic(157) static final operator(28) int ^ ( int A, int B );
Bitwise exclusive OR operator

|
intrinsic(158) static final operator(28) int | ( int A, int B );
Logical negation operator

*=
intrinsic(159) static final operator(34) int *= ( out int A, float B );
Multiplication assignment operator

/=
intrinsic(160) static final operator(34) int /= ( out int A, float B );
Division assignment operator

+=
intrinsic(161) static final operator(34) int += ( out int A, int B );
Addition assignment operator

-=
intrinsic(162) static final operator(34) int -= ( out int A, int B );
Subtraction assignment operator

++
intrinsic(163) static final preoperator int ++ ( out int A );
Increment preoperator

--
intrinsic(164) static final preoperator int -- ( out int A );
Decrement preoperator

++
intrinsic(165) static final postoperator int ++ ( out int A );
Increment postoperator

--
intrinsic(166) static final postoperator int -- ( out int A );
Decrement postoperator

Integer functions

Clamp
intrinsic(251) static final function int Clamp ( int V, int A, int B );
Returns the first number clamped to the interval from A to B

Max
intrinsic(250) static final function int Max ( int A, int B );
Returns the maximum of two integers

Min
intrinsic(249) static final function int Min ( int A, int B );
Returns the minimum of two integers

Rand
intrinsic(167) static final Function int Rand ( int Max );
Returns pseudo-random integer from 0 to MaxInt

Float operators

-
intrinsic(169) static final preoperator float - ( float A );
Unary minus operator

**
intrinsic(170) static final operator(12) float ** ( float A, float B );
Exponentiation

*
intrinsic(171) static final operator(16) float * ( float A, float B );
Multiplication operator

/
intrinsic(172) static final operator(16) float / ( float A, float B );
Division operator

%
intrinsic(173) static final operator(18) float % ( float A, float B );
Modulus operator

+
intrinsic(174) static final operator(20) float + ( float A, float B );
Addition operator

-
intrinsic(175) static final operator(20) float - ( float A, float B );
Subtraction operator

<
intrinsic(176) static final operator(24) bool < ( float A, float B );
Less than operator

>
intrinsic(177) static final operator(24) bool > ( float A, float B );
Greater than operator

<=
intrinsic(178) static final operator(24) bool <= ( float A, float B );
Less than equal operator

>=
intrinsic(179) static final operator(24) bool >= ( float A, float B );
Greater than equal operator

==
intrinsic(180) static final operator(24) bool == ( float A, float B );
Equality operator

~=
intrinsic(210) static final operator(24) bool ~= ( float A, float B );
Approximate equality (within 0.0001), case insensitive equality

!=
intrinsic(181) static final operator(26) bool != ( float A, float B );
Inequality operator

*=
intrinsic(182) static final operator(34) float *= ( out float A, float B );
Multiplication assignment operator

/=
intrinsic(183) static final operator(34) float /= ( out float A, float B );
Division assignment operator

+=
intrinsic(184) static final operator(34) float += ( out float A, float B );
Addition assignment operator

-=
intrinsic(185) static final operator(34) float -= ( out float A, float B );
Subtraction assignment operator

Float functions

Abs
intrinsic(186) static final function float Abs ( float A );
Returns the absolute value of its argument.

Sin
intrinsic(187) static final function float Sin ( float A );
Returns the sine of its argument.

Cos
intrinsic(188) static final function float Cos ( float A );
Returns the cosine of its argument.

Tan
intrinsic(189) static final function float Tan ( float A );
Returns the tangent of its argument.

Atan
intrinsic(190) static final function float Atan ( float A );
Returns the arctangent of its argument.

Exp
intrinsic(191) static final function float Exp ( float A );
Returns the exponential of its argument.

Loge
intrinsic(192) static final function float Loge ( float A );
Returns the natural logarithm of its argument.

Sqrt
intrinsic(193) static final function float Sqrt ( float A );
Returns the square root of its argument.

Square
intrinsic(194) static final function float Square( float A );
Returns the square of its argument.

FRand
intrinsic(195) static final function float FRand ();
Returns a pseudo-random number equal to or between 0 and 1.0.

FMin
intrinsic(244) static final function float FMin ( float A, float B );
Returns the minimum argument.

FMax
intrinsic(245) static final function float FMax ( float A, float B );
Returns the maximum argument.

FClamp
intrinsic(246) static final function float FClamp( float V, float A, float B );
Returns the first number clamped to the interval from A to B

Lerp
intrinsic(247) static final function float Lerp ( float Alpha, float A, float B );
Returns the linear interpolation between A and B

Smerp
intrinsic(248) static final function float Smerp ( float Alpha, float A, float B );
Returns an Alpha-smooth nonlinear interpolation between A and B

String operators

$
intrinsic(228) static final operator(40) string[255] $ ( coerce string[255] A, coerce String[255] B );
String Concatenation

<
intrinsic(197) static final operator(24) bool < ( string[255] A, string[255] B );
Less than operator

>
intrinsic(198) static final operator(24) bool > ( string[255] A, string[255] B );
Greater than operator

<=
intrinsic(199) static final operator(24) bool <= ( string[255] A, string[255] B );
Less than or equal operator

>=
intrinsic(200) static final operator(24) bool >= ( string[255] A, string[255] B );
Greater than or equal operator

==
intrinsic(201) static final operator(24) bool == ( string[255] A, string[255] B );
Equality operator

!=
intrinsic(202) static final operator(26) bool != ( string[255] A, string[255] B );
Inequality operator

~=
intrinsic(168) static final operator(24) bool ~= ( string[255] A, string[255] B );
Aproximate equality (within 0.0001), or, for strings, case insensitive equality

String functions

Asc
intrinsic static final function int Asc ( string[255] S );
Returns the character code corresponding to the first letter in a string.

Caps
intrinsic(209) static final function string[255] Caps ( coerce string[255] S );
Capitalizes the string.

Chr
intrinsic static final function string[16] Chr ( int i );
Returns the character associated with the specified character code.

InStr
intrinsic(205) static final function int InStr ( coerce string[255] S, coerce string[255] t);
Returns the position of the first occurrence of one string within another.

Left
intrinsic(207) static final function string[255] Left ( coerce string[255] S, int i );
Returns a specified number of characters from the left side of a string.

Len
intrinsic(204) static final function int Len ( coerce string[255] S );
Returns the length of the argument.

Mid
intrinsic(206) static final function string[255] Mid ( coerce string[255] S, int i, optional int j );
Returns a string containing a specified number of characters from a string.

Right
intrinsic(208) static final function string[255] Right ( coerce string[255] S, int i );
Returns a specified number of characters from the right side of a string.

Object operators

==
intrinsic(114) static final operator(24) bool == ( Object A, Object B );
Equality operator

!=
intrinsic(119) static final operator(26) bool != ( Object A, Object B );
Inequality operator

Name operators

==
intrinsic(254) static final operator(24) bool == ( name A, name B );
Equality operator

!=
intrinsic(255) static final operator(26) bool != ( name A, name B );
Inequality operator

Class Member Functions

BeginState
event BeginState();
Remarks
Called immediately when entering a state, while within the GotoState call that caused the state change.

ClassIsChildOf
intrinsic(258) static final function bool ClassIsChildOf( class TestClass, class ParentClass );
Parameters
class TestClass
class ParentClass
Return Value
True if class is a child, else False.
Remarks

Returns whether one class is a subclass of another class.

Disable
intrinsic(118) final function Disable( name ProbeFunc );
Parameters
name ProbeFunc
Remarks
Disables a probe event.

DynamicLoadObject
intrinsic static final function object DynamicLoadObject( string[32] ObjectName, class ObjectClass );
Parameters
String[32] ObjectName
Class ObjectClass
Return Value
If the object is successfully loaded it is returned, else None.
Remarks
Tries to load an object from a file, and returns it.

Enable
intrinsic(117) final function Enable( name ProbeFunc );
Parameters

Name ProbeFunc
Remarks
Enables a probe event. The only functions which work with Enable and Disable are: Spawned, Destroyed, GainedChild, LostChild, Trigger, UnTrigger, Timer, HitWall, Falling, Landed, ZoneChange, Touch, UnTouch, Bump, BeginState, EndState, BaseChange, Attach, Detach, ActorEntered, ActorLeaving, KillCredit, AnimEnd, EndedRotation, InterpolateEnd, EncroachingOn, EncroachedBy, FootZoneChange, HeadZoneChange, PainTimer, SpeechTimer, MayFall, Die, Tick, PlayerTick, Expired, SeePlayer, EnemyNotVisible, HearNoise, UpdateEyeHeight, SeeMonster, SeeFriend, SpecialHandling, BotDesireability.

EndState
event EndState();
Remarks
Called immediately before going out of the current state, while within the GotoState call that caused the state change.

GetEnum
intrinsic static final function name GetEnum( object E, int i );
Parameters

Object E
Int i
Return Value
Name of the nth element of an enumeration.
Remarks
Returns the nth element of an enumeration.

GetPropertyText
intrinsic final function string[192] GetPropertyText( string[32] PropName );
Parameters

String[32] PropName
Return Value
String[192] value of the argument.
Remarks
Converts the value of an arbitrary variable to text.

GetStateName
intrinsic(284) final function name GetStateName();
Return Value

name
Remarks
Returns the name of this object’s current state, None if none.

GotoState
intrinsic(113) final function GotoState( optional name NewState, optional name Label );
Parameters

Optional name NewState
Optional name Label
Remarks
Sets the object’s current state, None means no state. If no label is specified, the Begin label is gone to.

IsInState
intrinsic(281) final function bool IsInState( name TestState );
Parameters

Name TestState
Return Value
bool
Remarks
Returns whether this object is in the specified state.

Localize
intrinsic static function string[192] Localize( name SectionName, name KeyName, name PackageName );
Parameters

Name SectionName
Name KeyName
Name PackageName
Return Value
String[192]
Remarks
Returns a localized (internationally translated) string from a package’s .int file.

Log
intrinsic(231) final static function Log( coerce string[240] S, optional name Tag );
Parameters

Coerce string[240] S
Optional name Tag
Remarks

Writes a message to the log file, usually \Unreal\System\Unreal.log.

ResetConfig
intrinsic(543) final function ResetConfig();
Remarks

Resets the values of the "config" variables to the originals in the Default.ini file.

SaveConfig
intrinsic(536) final function SaveConfig();
Remarks

Saves the current values of all "config" variables to the Unreal.ini file.

SetPropertyText
intrinsic final function SetPropertyText( string[32] PropName, string[192] PropValue );
Parameters

String[32] PropName
String[192] PropValue
Remarks
Sets the value of an arbitrary variable from text.

Warn
intrinsic(232) final static function Warn( coerce string[240] S );
Parameters
Coerce string[240] S
Remarks
Writes a script warning to the log file, including the current script and function.
 


Copyright

Unreal™ © 1998 Epic Megagames, Inc. All Rights Reserved.