https://wiki.beyondunreal.com/w/index.php?action=history&feed=atom Legacy:Global Function (UT) - Revision history 2017-11-17T23:24:40Z Revision history for this page on the wiki MediaWiki 1.25.1 https://wiki.beyondunreal.com/Legacy:Global_Function_(UT)?diff=46407&oldid=prev SeriousBarbie: +"is equal to or" 2016-11-23T23:14:25Z <p>+&quot;is equal to or&quot;</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 23:14, 23 November 2016</td> </tr><tr><td colspan="2" class="diff-lineno" id="L59" >Line 59:</td> <td colspan="2" class="diff-lineno">Line 59:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>====Class Hierarchy ====</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>====Class Hierarchy ====</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; bool ClassIsChildOf (class TestClass, class ParentClass) [static] : Returns whether &lt;tt&gt;TestClass&lt;/tt&gt; is a subclass of &lt;tt&gt;Parentclass&lt;/tt&gt;.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; bool ClassIsChildOf (class TestClass, class ParentClass) [static] : Returns whether &lt;tt&gt;TestClass&lt;/tt&gt; is <ins class="diffchange diffchange-inline">equal to or </ins>a subclass of &lt;tt&gt;Parentclass&lt;/tt&gt;.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool IsA (name ClassName) : Returns whether the object's class is the specified class or a subclass. This function doesn't need a reference to the desired class, but just the class's name.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; bool IsA (name ClassName) : Returns whether the object's class is the specified class or a subclass. This function doesn't need a reference to the desired class, but just the class's name.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> </table> SeriousBarbie https://wiki.beyondunreal.com/Legacy:Global_Function_(UT)?diff=46229&oldid=prev SeriousBarbie: SetPropertyString -> SetPropertyText 2015-09-25T20:42:55Z <p>SetPropertyString -&gt; SetPropertyText</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 20:42, 25 September 2015</td> </tr><tr><td colspan="2" class="diff-lineno" id="L68" >Line 68:</td> <td colspan="2" class="diff-lineno">Line 68:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>====Objects / Properties ====</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>====Objects / Properties ====</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; string GetPropertyText (string PropName) : Returns the value of the specified property [[Legacy:Typecasting|typecasted]] to string. This is useful when you don't want any dependencies to the package of an object, but still need to access its properties.&lt;br /&gt;Usage: &lt;tt&gt;aString = anObject.GetPropertyText(&quot;''PropertyName''&quot;);&lt;/tt&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; string GetPropertyText (string PropName) : Returns the value of the specified property [[Legacy:Typecasting|typecasted]] to string. This is useful when you don't want any dependencies to the package of an object, but still need to access its properties.&lt;br /&gt;Usage: &lt;tt&gt;aString = anObject.GetPropertyText(&quot;''PropertyName''&quot;);&lt;/tt&gt;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; SetPropertyText (string PropName, string PropValue) : Assigns a value to the specified property of an object. Only use this for properties that can be [[Legacy:Typecasting|typecasted]] from string.&lt;br /&gt;Usage: &lt;tt&gt;anObject.<del class="diffchange diffchange-inline">SetPropertyString</del>(&quot;''PropertyName''&quot;, &quot;''new value''&quot;);&lt;/tt&gt;</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; SetPropertyText (string PropName, string PropValue) : Assigns a value to the specified property of an object. Only use this for properties that can be [[Legacy:Typecasting|typecasted]] from string.&lt;br /&gt;Usage: &lt;tt&gt;anObject.<ins class="diffchange diffchange-inline">SetPropertyText</ins>(&quot;''PropertyName''&quot;, &quot;''new value''&quot;);&lt;/tt&gt;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; name GetEnum (Object E, int i) [static] : Returns the i-th element of the given enumeration, as in &lt;code&gt;GetEnum(enum'MyEnum', 2)&lt;/code&gt; or an empty name of the specified index exceeds the number of elements in the enumeration.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; name GetEnum (Object E, int i) [static] : Returns the i-th element of the given enumeration, as in &lt;code&gt;GetEnum(enum'MyEnum', 2)&lt;/code&gt; or an empty name of the specified index exceeds the number of elements in the enumeration.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; [[Legacy:Object (UT)|Object (UT)]] DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail) [static] : Loads and returns the specified object. If &lt;tt&gt;bMayFail&lt;/tt&gt; is true no error will be logged.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; [[Legacy:Object (UT)|Object (UT)]] DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail) [static] : Loads and returns the specified object. If &lt;tt&gt;bMayFail&lt;/tt&gt; is true no error will be logged.</div></td></tr> </table> SeriousBarbie https://wiki.beyondunreal.com/Legacy:Global_Function_(UT)?diff=33855&oldid=prev Azura: Removed incorrect reference to modulo in description of Abs function 2008-12-30T15:40:07Z <p>Removed incorrect reference to modulo in description of Abs function</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 15:40, 30 December 2008</td> </tr><tr><td colspan='4' style='text-align: center;' class='diff-multi'>(One intermediate revision by one other user not shown)</td></tr><tr><td colspan="2" class="diff-lineno" id="L16" >Line 16:</td> <td colspan="2" class="diff-lineno">Line 16:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===Float Functions ===</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>===Float Functions ===</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>; float Abs (float A) [static] : Returns the absolute value <del class="diffchange diffchange-inline">(also known as the modulo) </del>of A, usually written |A|. Eg: Abs(5) == Abs(-5) == 5.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>; float Abs (float A) [static] : Returns the absolute value of A, usually written |A|. Eg: Abs(5) == Abs(-5) == 5.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Sin (float A) [static] : Returns sine( A )</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Sin (float A) [static] : Returns sine( A )</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Cos (float A) [static] : Returns cosine( A )</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Cos (float A) [static] : Returns cosine( A )</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="L31" >Line 31:</td> <td colspan="2" class="diff-lineno">Line 31:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Lerp (float Alpha, float A, float B) [static] : &quot;Returns the linear interpolation between A and B.&quot;&lt;br /&gt;The return value is calculated through something like this:&lt;br /&gt;&lt;tt&gt;(B - A) * Alpha + A&lt;/tt&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Lerp (float Alpha, float A, float B) [static] : &quot;Returns the linear interpolation between A and B.&quot;&lt;br /&gt;The return value is calculated through something like this:&lt;br /&gt;&lt;tt&gt;(B - A) * Alpha + A&lt;/tt&gt;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Smerp (float Alpha, float A, float B) [static] : Returns an Alpha-smooth nonlinear interpolation between A and B.&lt;br /&gt;The return value seems to be calculated through something like this:&lt;br /&gt;&lt;tt&gt;(-2 * (B - A) * Alpha ** 3) + (3 * (B - A) * Alpha ** 2) + A&lt;/tt&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float Smerp (float Alpha, float A, float B) [static] : Returns an Alpha-smooth nonlinear interpolation between A and B.&lt;br /&gt;The return value seems to be calculated through something like this:&lt;br /&gt;&lt;tt&gt;(-2 * (B - A) * Alpha ** 3) + (3 * (B - A) * Alpha ** 2) + A&lt;/tt&gt;</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>;[[Image:Legacy_interpolation-smerp.gif|]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>;[[Image:Legacy_interpolation-smerp.gif|<ins class="diffchange diffchange-inline">Legacy_interpolation-smerp.gif</ins>]]</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float RandRange (float Min, float Max) : Returns a random number between Min and Max. This function is not static.</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>; float RandRange (float Min, float Max) : Returns a random number between Min and Max. This function is not static.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr> <tr><td colspan="2" class="diff-lineno" id="L81" >Line 81:</td> <td colspan="2" class="diff-lineno">Line 81:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Operators|Operators]]</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Operators|Operators]]</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Object (UT)|Object class]]</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Object (UT)|Object class]]</div></td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&#160;</td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">==Discussion==</del></div></td><td colspan="2">&#160;</td></tr> <tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">:'''Nobody:''' Do all the string functions count the first character of the passed string as 0? I know it says here that instr(...) does this, and I've updated mid(...) to show this, not sure of the others, if so needs clarified.</del></div></td><td colspan="2">&#160;</td></tr> </table> Azura https://wiki.beyondunreal.com/Legacy:Global_Function_(UT)?diff=3399&oldid=prev Bc179129.bendcable.com: that seems better =) 2006-02-02T03:28:48Z <p>that seems better =)</p> <p><b>New page</b></p><div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Object (UT)|Object (UT)]] (Methods)}}<br /> <br /> The functions listed here are globally available in all classes. Due to [[Legacy:UnrealScript|UnrealScript]]'s strict object-oriented approach, they're actually methods of the [[Legacy:Object (UT)|Object (UT)]] class.<br /> <br /> Almost all of these functions are declared as native and final (see [[Legacy:Class Syntax|class syntax]]) and most of them are also [[Legacy:Static Function|static function]]s.<br /> <br /> See [[Legacy:Vector|vector]] and [[Legacy:Rotator|rotator]] for functions on those variable types.<br /> <br /> See [[Legacy:Global Function|Global Function]] for global UT2003 functions.<br /> <br /> ===Integer Functions ===<br /> ; int Rand (int Max) [static] : Returns a random number ranging from 0 to Max-1.<br /> ; int Min (int A, int B) [static] : Returns the lower of the two values.<br /> ; int Max (int A, int B) [static] : Returns the higher of the two values.<br /> ; int Clamp (int V, int A, int B) [static] : If V is smaller than A, A is returned. If V is larger than B, B is returned. In any other case V is returned.<br /> <br /> ===Float Functions ===<br /> ; float Abs (float A) [static] : Returns the absolute value (also known as the modulo) of A, usually written |A|. Eg: Abs(5) == Abs(-5) == 5.<br /> ; float Sin (float A) [static] : Returns sine( A )<br /> ; float Cos (float A) [static] : Returns cosine( A )<br /> ; float Tan (float A) [static] : Returns tan( A )<br /> ; float Atan (float A) [static] : Inverse tangent. Returns tan&lt;sup&gt;-1-&lt;/sup&gt;(A). Other inverse trig functions are not included in [[Legacy:UT|UT]]'s UnrealScript. (see [[Legacy:Useful Maths Functions|Useful Maths Functions]])<br /> ; float Exp (float A) [static] : Returns e&lt;sup&gt;A&lt;/sup&gt;<br /> ; float Loge (float A) [static] : Returns log(A), the natural logarithm.<br /> ; float Sqrt (float A) [static] : Returns the square root of A.<br /> ; float Square (float A) [static] : Returns A&lt;sup&gt;2&lt;/sup&gt;.<br /> ; float FRand ( ) : Returns a random number between 0 and 1.<br /> ; float FMin (float A, float B) [static] : Returns the lower of the two values.<br /> ; float FMax (float A, float B) [static] : Returns the higher of the two values.<br /> ; float FClamp (float V, float A, float B) [static] : If V is smaller than A, A is returned. If V is larger than B, B is returned. In any other case V is returned.<br /> ; float Lerp (float Alpha, float A, float B) [static] : &quot;Returns the linear interpolation between A and B.&quot;&lt;br /&gt;The return value is calculated through something like this:&lt;br /&gt;&lt;tt&gt;(B - A) * Alpha + A&lt;/tt&gt;<br /> ; float Smerp (float Alpha, float A, float B) [static] : Returns an Alpha-smooth nonlinear interpolation between A and B.&lt;br /&gt;The return value seems to be calculated through something like this:&lt;br /&gt;&lt;tt&gt;(-2 * (B - A) * Alpha ** 3) + (3 * (B - A) * Alpha ** 2) + A&lt;/tt&gt;<br /> ;[[Image:Legacy_interpolation-smerp.gif|]]<br /> ; float RandRange (float Min, float Max) : Returns a random number between Min and Max. This function is not static.<br /> <br /> ===String Functions ===<br /> ; int Len (coerce string S) [static] : Returns the length of the string, i.e. the number of characters in it.<br /> ; int InStr (coerce string haystack, coerce string needle) [static] : If the string &lt;tt&gt;needle&lt;/tt&gt; is found inside &lt;tt&gt;haystack&lt;/tt&gt;, the number of characters in &lt;tt&gt;haystack&lt;/tt&gt; ''before'' the first occurance of &lt;tt&gt;needle&lt;/tt&gt; is returned. That is, if the &lt;tt&gt;needle&lt;/tt&gt; is found right at the beginning of &lt;tt&gt;haystack&lt;/tt&gt;, 0 is returned. If &lt;tt&gt;haystack&lt;/tt&gt; doesn't contain &lt;tt&gt;needle&lt;/tt&gt;, InStr returns -1.<br /> ; string Mid (coerce string S, int skip, optional int num) [static] : Returns a substring of &lt;tt&gt;S&lt;/tt&gt;, skipping &lt;tt&gt;skip&lt;/tt&gt; characters and returning the next &lt;tt&gt;num&lt;/tt&gt; characters or all remaining if the third parameter is left out. Mid(&quot;hello&quot;, 0, 2) returns &quot;he&quot;, Mid(&quot;hello&quot;, 1) returns &quot;ello&quot;, i.e. all but the first character.<br /> ; string Left (coerce string S, int num) [static] : Returns the &lt;tt&gt;num&lt;/tt&gt; leftmost characters of &lt;tt&gt;S&lt;/tt&gt; or all of them if &lt;tt&gt;S&lt;/tt&gt; contains less than &lt;tt&gt;num&lt;/tt&gt; characters.<br /> ; string Right (coerce string S, int num) [static] : Returns the &lt;tt&gt;num&lt;/tt&gt; rightmost characters of &lt;tt&gt;S&lt;/tt&gt; or all of them if &lt;tt&gt;S&lt;/tt&gt; contains less than &lt;tt&gt;num&lt;/tt&gt; characters.<br /> ; string Caps (coerce string S) [static] : Returns &lt;tt&gt;S&lt;/tt&gt; converted to uppercase.<br /> ; string Chr (int i) [static] : Returns the character matchin the given ASCII code.<br /> ; int Asc (string S) [static] : Returns the ASCII code of the first character in &lt;tt&gt;S&lt;/tt&gt;.<br /> <br /> ===General Functions ===<br /> <br /> ====Logging ====<br /> ; Log (coerce string S, optional name Tag) [static] : Writes a line to the log file. The line begins with the Tag or &quot;ScriptLog:&quot; if Tag was not specified, followed by the log string.&lt;br /&gt;The tags 'Error' and 'Warning' (and probably others, too) have a special meaning in [[Legacy:Commandlet|Commandlet]]s.<br /> ; Warn (coerce string S) [static] : Same like &lt;tt&gt;Log&lt;/tt&gt;, but the line starts with &quot;ScriptWarning:&quot; and contains information about the object, state and function that called &lt;tt&gt;Warn&lt;/tt&gt;.<br /> ; string Localize (string SectionName, string KeyName, string PackageName) [static] : Returns the string found in ''PackageName''.int in the [''SectionName''] section. Logs an error if no localization for the specified string is found.<br /> <br /> ====State-Related ====<br /> ; GotoState (optional name NewState, optional name Label) : Switches to a new state. State code execution begins at the specified label or at &quot;Begin:&quot; if &lt;tt&gt;Label&lt;/tt&gt; is not specified.&lt;br /&gt;Before the state is changed the old state's &lt;tt&gt;EndState&lt;/tt&gt; function is called. After the state changed &lt;tt&gt;BeginState&lt;/tt&gt; of the new state is called.<br /> ; bool IsInState (name TestState) : Returns whether the object's current state is the one specified.<br /> ; name GetStateName ( ) : Returns the object's current state name.<br /> ; BeginState ( ) [not native, not final] : This event is executed during GotoState right after the object switched to the new state. This function can be overridden in any state of any class.<br /> ; EndState ( ) [not native, not final] : This event is executed during GotoState right before the object switches to the new state. This function can be overridden in any state of any class.<br /> <br /> ====Class Hierarchy ====<br /> ; bool ClassIsChildOf (class TestClass, class ParentClass) [static] : Returns whether &lt;tt&gt;TestClass&lt;/tt&gt; is a subclass of &lt;tt&gt;Parentclass&lt;/tt&gt;.<br /> ; bool IsA (name ClassName) : Returns whether the object's class is the specified class or a subclass. This function doesn't need a reference to the desired class, but just the class's name.<br /> <br /> ====Enabling / Disabling Functions ====<br /> ; Enable (name ProbeFunc) : Enables a [[Legacy:Probe Function|probe function]].<br /> ; Disable (name ProbeFunc) : Disables a [[Legacy:Probe Function|probe function]].<br /> <br /> ====Objects / Properties ====<br /> ; string GetPropertyText (string PropName) : Returns the value of the specified property [[Legacy:Typecasting|typecasted]] to string. This is useful when you don't want any dependencies to the package of an object, but still need to access its properties.&lt;br /&gt;Usage: &lt;tt&gt;aString = anObject.GetPropertyText(&quot;''PropertyName''&quot;);&lt;/tt&gt;<br /> ; SetPropertyText (string PropName, string PropValue) : Assigns a value to the specified property of an object. Only use this for properties that can be [[Legacy:Typecasting|typecasted]] from string.&lt;br /&gt;Usage: &lt;tt&gt;anObject.SetPropertyString(&quot;''PropertyName''&quot;, &quot;''new value''&quot;);&lt;/tt&gt;<br /> ; name GetEnum (Object E, int i) [static] : Returns the i-th element of the given enumeration, as in &lt;code&gt;GetEnum(enum'MyEnum', 2)&lt;/code&gt; or an empty name of the specified index exceeds the number of elements in the enumeration.<br /> ; [[Legacy:Object (UT)|Object (UT)]] DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail) [static] : Loads and returns the specified object. If &lt;tt&gt;bMayFail&lt;/tt&gt; is true no error will be logged.<br /> ; SaveConfig ( ) : Saves the current values of config and globalconfig variables of this object to the ini file and sets them as default values for the object's class.<br /> ; StaticSaveConfig ( ) [static] : Saves the default values of config and globalconfig variables of this object's class to the ini file.<br /> ; ResetConfig ( ) [static] : Resets the config and globalconfig variables of this object's class to the values stored in Default.ini or DefUser.ini.<br /> <br /> ==Related Topics ==<br /> * [[Legacy:UnrealScript|UnrealScript]]<br /> ** [[Legacy:Class Syntax|Class Syntax]]<br /> ** [[Legacy:Function Syntax|Function Syntax]]<br /> ** [[Legacy:Operators|Operators]]<br /> ** [[Legacy:Object (UT)|Object class]]</div> Bc179129.bendcable.com https://wiki.beyondunreal.com/Legacy:Global_Function_(UT)?diff=3400&oldid=prev Wormbo: better description for the string functions 2006-02-01T17:53:57Z <p>better description for the string functions</p> <table class='diff diff-contentalign-left'> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr style='vertical-align: top;'> <td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td> <td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 17:53, 1 February 2006</td> </tr><tr><td colspan="2" class="diff-lineno" id="L81" >Line 81:</td> <td colspan="2" class="diff-lineno">Line 81:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Operators|Operators]]</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Operators|Operators]]</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Object (UT)|Object class]]</div></td><td class='diff-marker'>&#160;</td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>** [[Legacy:Object (UT)|Object class]]</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Discussion==</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">:'''Nobody:''' Do all the string functions count the first character of the passed string as 0? I know it says here that instr(...) does this, and I've updated mid(...) to show this, not sure of the others, if so needs clarified.</ins></div></td></tr> </table> Wormbo