UE3:Object static native functions (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
UDK Object (static native functions)
Object static native functions in other games:
Other member categories for this class:

Static native functions

Abs

native(186) static final function float Abs (float A)


Acos

native static final function float Acos (float A)


Asc

native(237) static final function int Asc (string S)


Asin

native static final function float Asin (float A)


Atan

native(190) static final function float Atan (float A)


Atan2

native static final function float Atan2 (float A, float B)


Caps

native(235) static final function string Caps (coerce string S)


Chr

native(236) static final function string Chr (int i)


Clamp

native(251) static final function int Clamp (int V, int A, int B)


ClampLength

native static final function Vector ClampLength (Vector V, float MaxLength)

Clamps a vector to not be longer than MaxLength.

ClassIsChildOf

native(258) static final function bool ClassIsChildOf (Class TestClass, Class ParentClass)

Determine if a class is a child of another class.

Returns:

TRUE if TestClass == ParentClass, or if TestClass is a child of ParentClass; FALSE otherwise, or if either the value for either parameter is 'None'.

Cos

native(188) static final function float Cos (float A)


DebugBreak

native static final function DebugBreak (optional int UserFlags, optional EDebugBreakType DebuggerType)

Script-induced breakpoint. Useful for examining state with the debugger at a particular point in script.

Parameters:

  • UserFlags - user-defined flags to be used for e.g. indentifying different calls to DebugBreak in the same session
  • DebuggerType - C++ debugger, UScript debugger, or both

DynamicLoadObject

native static final function Object DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail)


Exp

native(191) static final function float Exp (float A)


FCeil

native static final function int FCeil (float A)


FClamp

native(246) static final function float FClamp (float V, float A, float B)


FCubicInterp

native static final function float FCubicInterp (float P0, float T0, float P1, float T1, float A)

Cubic Spline interpolation.

Parameters:

  • P - end points
  • T - tangent directions at end points
  • Alpha - distance along spline

Returns:

evaluated value.

FFloor

native static final function int FFloor (float A)


FindObject

native static final function Object FindObject (string ObjectName, Class ObjectClass)


FInterpConstantTo

native static final function float FInterpConstantTo (float Current, float Target, float DeltaTime, float InterpSpeed)

Same as above, but using a constant step

FInterpEaseInOut

native static final function float FInterpEaseInOut (float A, float B, float Alpha, float Exp)

Interpolates with both ease-in and ease-out (smoothly departs A, smoothly approaches B).

Parameters:

  • A - Value to interpolate from.
  • B - Value to interpolate to.
  • Alpha - Interpolant.
  • Exp - Exponent. Higher values result in more rapid acceleration adn deceleration.

Returns:

Interpolated value.

FInterpTo

native static final function float FInterpTo (float Current, float Target, float DeltaTime, float InterpSpeed)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position. (Doesn't work well when target teleports)

Parameters:

  • Current - Actual position
  • Target - Target position
  • DeltaTime - time since last tick
  • InterpSpeed - Interpolation speed

Returns:

new interpolated position

FMax

native(245) static final function float FMax (float A, float B)


FMin

native(244) static final function float FMin (float A, float B)


FRand

native(195) static final function float FRand ()


GetAngularDistance

native static final function bool GetAngularDistance (out Vector2D OutAngularDist, Vector Direction, Vector AxisX, Vector AxisY, Vector AxisZ)

Calculates the angular distance of vector 'Direction' to coordinate system O(AxisX,AxisY,AxisZ).

Orientation: (consider 'O' the first person view of the player, and 'Direction' a vector pointing to an enemy) - positive azimuth means enemy is on the right of crosshair. (negative means left). - positive elevation means enemy is on top of crosshair, negative means below.

Parameters:

  • out_AngularDist - X = Azimuth angle (in radians) of 'Direction' vector compared to plane (AxisX,AxisZ). .Y = Elevation angle (in radians) of 'Direction' vector compared to plane (AxisX,AxisY).
  • Direction - Direction of target.
  • AxisX - X component of reference system.
  • AxisY - Y component of reference system.
  • AxisZ - Z component of reference system.

Output: true if 'Direction' is facing AxisX (Direction dot AxisX >= 0.f)

GetAngularFromDotDist

native static final function GetAngularFromDotDist (out Vector2D OutAngDist, Vector2D DotDist)

Converts Dot distance to angular distance.

Parameters:

  • OutAngDist - Angular distance in radians.
  • DotDist - Dot distance.

See: GetAngularDistance() and GetDotDistance().

GetAxes

native(229) static final function GetAxes (Rotator A, out Vector X, out Vector Y, out Vector Z)


GetDotDistance

native static final function bool GetDotDistance (out Vector2D OutDotDist, Vector Direction, Vector AxisX, Vector AxisY, Vector AxisZ)

Calculates the dotted distance of vector 'Direction' to coordinate system O(AxisX,AxisY,AxisZ).

Orientation: (consider 'O' the first person view of the player, and 'Direction' a vector pointing to an enemy) - positive azimuth means enemy is on the right of crosshair. (negative means left). - positive elevation means enemy is on top of crosshair, negative means below.

Parameters:

  • OutDotDist - X = 'Direction' dot AxisX relative to plane (AxisX,AxisZ). (== Cos(Azimuth)) .Y = 'Direction' dot AxisX relative to plane (AxisX,AxisY). (== Sin(Elevation))
  • Direction - direction of target.
  • AxisX - X component of reference system.
  • AxisY - Y component of reference system.
  • AxisZ - Z component of reference system.

Returns:

true if 'Direction' is facing AxisX (Direction dot AxisX >= 0.f)

Note: Azimuth' (.X) sign is changed to represent left/right and not front/behind. front/behind is the funtion's return value.

GetEnum

native static final function name GetEnum (Object E, coerce int i)


GetFuncName

native static final function name GetFuncName ()

Returns the current calling function's name, useful for debugging.

GetMappedRangeValue

static final simulated native function float GetMappedRangeValue (Vector2D InputRange, Vector2D OutputRange, float Value)

Useful for mapping a value in one value range to a different value range. Output is clamped to the OutputRange. e.g. given that velocities [50..100] correspond to a sound volume of [0.2..1.4], find the

    volume for a velocity of 77.

GetPerObjectConfigSections

native static final function bool GetPerObjectConfigSections (Class SearchClass, out array<stringout_SectionNames, optional Object ObjectOuter, optional int MaxResults)

Retrieve the names of sections which contain data for the specified PerObjectConfig class.

Parameters:

  • SearchClass - the PerObjectConfig class to retrieve sections for.
  • out_SectionNames - will receive the list of section names that correspond to PerObjectConfig sections of the specified class
  • ObjectOuter - the Outer to use for determining which file to look in. Specify the same object that is used when creating the PerObjectConfig objects that sections are being retrieved for. (PerObjectConfig data is generally stored in a file named after the Outer used when creating those objects, unless the PerObjectConfig class specifies a config file in its class declaration); specify None to use the transient package as the Outer.
  • MaxResults - the maximum number of section names to retrieve

Returns:

TRUE if the file specified was found and it contained at least 1 section for the specified class

GetUnAxes

native(230) static final function GetUnAxes (Rotator A, out Vector X, out Vector Y, out Vector Z)


InStr

native(126) static final function int InStr (coerce string S, coerce string t, optional bool bSearchFromRight, optional bool bIgnoreCase, optional int StartPos)


InverseTransformNormal

native static final function Vector InverseTransformNormal (Matrix TM, Vector A)


InverseTransformVector

native static final function Vector InverseTransformVector (Matrix TM, Vector A)


IsUTracing

native static final function bool IsUTracing ()

Returns whether script function call trace logging is currently enabled.

IsZero

native(1501) static final function bool IsZero (Vector A)


Left

native(128) static final function string Left (coerce string S, int i)


Len

native(125) static final function int Len (coerce string S)


Lerp

native(247) static final function float Lerp (float A, float B, float Alpha)


Localize

native static function string Localize (string SectionName, string KeyName, string PackageName)


Locs

native(238) static final function string Locs (coerce string S)


Loge

native(192) static final function float Loge (float A)


LogInternal

native(231) final static function LogInternal (coerce string S, optional name Tag)

Writes a message to the log. This function should never be called directly - use the `log macro instead, which has the following signature:

log( coerce string Msg, optional bool bCondition=true, optional name LogTag='ScriptLog' );

Parameters:

  • Msg - the string to print to the log
  • bCondition - if specified, the message is only printed to the log if this condition is satisfied.
  • LogTag - if specified, the message will be prepended with this tag in the log file

MakeRotationMatrix

native static final function Matrix MakeRotationMatrix (Rotator Rotation)


MakeRotationTranslationMatrix

native static final function Matrix MakeRotationTranslationMatrix (Vector Translation, Rotator Rotation)


MatrixGetAxis

native static final function Vector MatrixGetAxis (Matrix TM, EAxis Axis)


MatrixGetOrigin

native static final function Vector MatrixGetOrigin (Matrix TM)


MatrixGetRotator

native static final function Rotator MatrixGetRotator (Matrix TM)


Max

native(250) static final function int Max (int A, int B)


Mid

native(127) static final function string Mid (coerce string S, int i, optional int j)


Min

native(249) static final function int Min (int A, int B)


MirrorVectorByNormal

native(300) static final function Vector MirrorVectorByNormal (Vector InVect, Vector InNormal)


Normal

native(226) static final function Vector Normal (Vector A)


Normalize

native static final function Rotator Normalize (Rotator Rot)


NormalizeRotAxis

native static final function int NormalizeRotAxis (int Angle)

Returns a Rotator axis within the [-32768,+32767] range in float

Parameters:

  • RotAxis - axis of the rotator

Returns:

Normalized axis value, within the [-32768,+32767] range.

OrthoRotation

native static final function Rotator OrthoRotation (Vector X, Vector Y, Vector Z)


ParseStringIntoArray

native static final function ParseStringIntoArray (string BaseString, out array<stringPieces, string Delim, bool bCullEmpty)

Breaks up a delimited string into elements of a string array.

Parameters:

  • BaseString - The string to break up
  • Pieces - The array to fill with the string pieces
  • Delim - The string to delimit on
  • bCullEmpty - If true, empty strings are not added to the array

PathName

native static final function string PathName (Object CheckObject)

Returns the full path name of the specified object (including package and groups), ie CheckObject::GetPathName().

PointProjectToPlane

native static final function Vector PointProjectToPlane (Vector Point, Vector A, Vector B, Vector C)

Calculates a point's projection onto a plane

Parameters:

  • Point - point to project onto the plane
  • A - point on plane
  • B - point on plane
  • C - point on plane

Returns:

projection of point onto the plane defined by ABC

ProjectOnTo

native(1500) static final function Vector ProjectOnTo (Vector x, Vector y)


QuatDot

native static final function float QuatDot (Quat A, Quat B)


QuatFindBetween

native static final function Quat QuatFindBetween (Vector A, Vector B)


QuatFromAxisAndAngle

native static final function Quat QuatFromAxisAndAngle (Vector Axis, float Angle)


QuatFromRotator

native static final function Quat QuatFromRotator (Rotator A)


QuatInvert

native static final function Quat QuatInvert (Quat A)


QuatProduct

native static final function Quat QuatProduct (Quat A, Quat B)


QuatRotateVector

native static final function Vector QuatRotateVector (Quat A, Vector B)


QuatSlerp

native static final function Quat QuatSlerp (Quat A, Quat B, float Alpha, optional bool bShortestPath)


QuatToRotator

native static final function Rotator QuatToRotator (Quat A)


Rand

native(167) static final function int Rand (int Max)

Rand will give you a value between 0 and Max -1 *

RDiff

native static final function float RDiff (Rotator A, Rotator B)

Gives the rotation difference between two Rotators, taking the shortest route between them (in degrees).

Repl

native(201) static final function string Repl (coerce string Src, coerce string Match, coerce string With, optional bool bCaseSensitive)


Right

native(234) static final function string Right (coerce string S, int i)


RInterpTo

native static final function Rotator RInterpTo (Rotator Current, Rotator Target, float DeltaTime, float InterpSpeed, optional bool bConstantInterpSpeed)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a position. (Doesn't work well when target teleports)

Parameters:

  • Current - Actual position
  • Target - Target position
  • DeltaTime - time since last tick
  • InterpSpeed - Interpolation speed, if !bConstantInterpSpeed will perform a continuous lerp, otherwise will interp at constant speed

Returns:

new interpolated position

RLerp

native static final function Rotator RLerp (Rotator A, Rotator B, float Alpha, optional bool bShortestPath)


RotRand

native(320) static final function Rotator RotRand (optional bool bRoll)


Round

native(199) static final function int Round (float A)


RSmerp

native static final function Rotator RSmerp (Rotator A, Rotator B, float Alpha, optional bool bShortestPath)


RTransform

native static final function Rotator RTransform (Rotator R, Rotator RBasis)

Given rotation R in the space defined by RBasis, return R in "world" space

ScriptTrace

native static final function ScriptTrace ()

Dumps the current script function stack to the log file, useful for debugging.

SetUTracing

native static final function SetUTracing (bool bShouldUTrace)

Enables/disables script function call trace logging.

Sin

native(187) static final function float Sin (float A)


Sqrt

native(193) static final function float Sqrt (float A)


Square

native(194) static final function float Square (float A)


StaticSaveConfig

native static final function StaticSaveConfig ()


Tan

native(189) static final function float Tan (float A)


ToHex

native static final function string ToHex (int A)


TransformNormal

native static final function Vector TransformNormal (Matrix TM, Vector A)


TransformVector

native static final function Vector TransformVector (Matrix TM, Vector A)


VInterpTo

native static final function Vector VInterpTo (Vector Current, Vector Target, float DeltaTime, float InterpSpeed)

Tries to reach Target based on distance from Current position, giving a nice smooth feeling when tracking a location. (Doesn't work well when target teleports)

Parameters:

  • Current - Actual location
  • Target - Target location
  • DeltaTime - time since last tick
  • InterpSpeed - Interpolation speed

Returns:

new interpolated position

VLerp

native static final function Vector VLerp (Vector A, Vector B, float Alpha)


VRand

native(252) static final function Vector VRand ()


VRandCone

native static final function Vector VRandCone (Vector Dir, float ConeHalfAngleRadians)


VRandCone2

native static final function Vector VRandCone2 (Vector Dir, float HorizontalConeHalfAngleRadians, float VerticalConeHalfAngleRadians)


VSize

native(225) static final function float VSize (Vector A)


VSize2D

native static final function float VSize2D (Vector A)


VSizeSq

native static final function float VSizeSq (Vector A)


VSizeSq2D

native static final function float VSizeSq2D (Vector A)


VSmerp

native static final function Vector VSmerp (Vector A, Vector B, float Alpha)


WarnInternal

native(232) final static function WarnInternal (coerce string S)

Same as calling LogInternal(SomeMsg, 'Warning'); This function should never be called directly - use the `warn macro instead, which has the following signature:

warn( coerce string Msg, optional bool bCondition=true );