<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://acsutils.strangled.net/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>ACSUtils Wiki - functions</title>
        <description>An ACS library for ZDoom-based ports</description>
        <link>https://acsutils.strangled.net/</link>
        <lastBuildDate>Thu, 30 Apr 2026 00:14:25 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://acsutils.strangled.net/_media/wiki:dokuwiki.svg</url>
            <title>ACSUtils Wiki</title>
            <link>https://acsutils.strangled.net/</link>
        </image>
        <item>
            <title>a_GetCVarFixed</title>
            <link>https://acsutils.strangled.net/functions:a_getcvarfixed?rev=1497608711&amp;do=diff</link>
            <description>a_GetCVarFixed

zdoom cvar

fixed a_GetCVarFixed(str name)
a_GetCVarFixed()GDCCGetCVarFixed()
Description

Returns the value of an int or float CVar as a fixed-point number.

Returns 0 if the CVar doesn&#039;t exist or is not a number.

The function works by calling GetCVarString and parsing the text with</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 16 Jun 2017 10:25:11 +0000</pubDate>
        </item>
        <item>
            <title>a_GetUserCVarFixed</title>
            <link>https://acsutils.strangled.net/functions:a_getusercvarfixed?rev=1497355971&amp;do=diff</link>
            <description>a_GetUserCVarFixed

zdoom cvar needs_examples

fixed a_GetUserCVarFixed(str name)
a_GetUserCVarFixed()GDCCGetUserCVarFixed()
Description

A GetUserCVar version of GetCVarFixed.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:12:51 +0000</pubDate>
        </item>
        <item>
            <title>abs</title>
            <link>https://acsutils.strangled.net/functions:abs?rev=1492431233&amp;do=diff</link>
            <description>abs

math

num abs(num x)

num - any numeric type (int or fixed)

Description

Returns the absolute value of x.
abs(INT_MIN)INT_MININT_MAX
Examples


abs( 2.1) -&gt; 2.1
abs(-2.1) -&gt; 2.1
abs( 123) -&gt; 123
abs(-123) -&gt; 123</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 12:13:53 +0000</pubDate>
        </item>
        <item>
            <title>accel2grav</title>
            <link>https://acsutils.strangled.net/functions:accel2grav?rev=1492430074&amp;do=diff</link>
            <description>accel2grav

math units

fixed accel2grav(fixed acceleration)

Description

Converts acceleration (mapunits^2 per tic) to sv_gravity units.

Examples


accel2grav(1.0) -&gt; 800.0;
accel2grav(0) -&gt; 0.0;
accel2grav(2.0) -&gt; 1600.0;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:54:34 +0000</pubDate>
        </item>
        <item>
            <title>acos</title>
            <link>https://acsutils.strangled.net/functions:acos?rev=1489763098&amp;do=diff</link>
            <description>acos

math trigonometry needs_examples

angle acos(fixed x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the arccosine of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 15:04:58 +0000</pubDate>
        </item>
        <item>
            <title>acosec</title>
            <link>https://acsutils.strangled.net/functions:acosec?rev=1489605319&amp;do=diff</link>
            <description>acosec

math trigonometry needs_examples

angle acosec(fixed x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the arccosecant of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:15:19 +0000</pubDate>
        </item>
        <item>
            <title>acot</title>
            <link>https://acsutils.strangled.net/functions:acot?rev=1489605260&amp;do=diff</link>
            <description>acot

math trigonometry needs_examples

angle acot(fixed x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the arccotangent of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:14:20 +0000</pubDate>
        </item>
        <item>
            <title>ActorDistance</title>
            <link>https://acsutils.strangled.net/functions:actordistance?rev=1489606213&amp;do=diff</link>
            <description>ActorDistance

fixed ActorDistance(int tid1, int tid2)

Description

Returns the distance between two actors in mapunits, taking the Z coordinates into account.

Example


print(s:&quot;You are &quot;, f:ActorDistance(0, monstertid), s:&quot; mapunits away from the monster&quot;,
      s:&quot;he might be above you&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:30:13 +0000</pubDate>
        </item>
        <item>
            <title>ActorDistance2D</title>
            <link>https://acsutils.strangled.net/functions:actordistance2d?rev=1489606109&amp;do=diff</link>
            <description>ActorDistance2D

fixed ActorDistance2D(int tid1, int tid2)

Description

Returns the distance between two actors on the XY plane in mapunits, ignoring the Z dimension.

Example


print(s:&quot;You are &quot;, f:ActorDistance2D(0, monstertid), s:&quot; mapunits away from the monster&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:28:29 +0000</pubDate>
        </item>
        <item>
            <title>ActorExists</title>
            <link>https://acsutils.strangled.net/functions:actorexists?rev=1500214418&amp;do=diff</link>
            <description>ActorExists

zdoom needs_examples

bool ActorExists(int tid)

Description

Returns true if at least one actor with the specified tid exists. If tid is 0, returns true if the activator of the script is an actor.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 16 Jul 2017 14:13:38 +0000</pubDate>
        </item>
        <item>
            <title>ang2deg</title>
            <link>https://acsutils.strangled.net/functions:ang2deg?rev=1492429563&amp;do=diff</link>
            <description>ang2deg

math units needs_examples

fixed ang2deg(angle a)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Converts a ZDoom angle to degrees and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:46:03 +0000</pubDate>
        </item>
        <item>
            <title>ang2rad</title>
            <link>https://acsutils.strangled.net/functions:ang2rad?rev=1492429586&amp;do=diff</link>
            <description>ang2rad

math units needs_examples

fixed ang2rad(angle a)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Converts a ZDoom angle to radians and returns the result</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:46:26 +0000</pubDate>
        </item>
        <item>
            <title>asec</title>
            <link>https://acsutils.strangled.net/functions:asec?rev=1489605299&amp;do=diff</link>
            <description>asec

math trigonometry needs_examples

angle asec(fixed x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the arcsecant of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:14:59 +0000</pubDate>
        </item>
        <item>
            <title>asin</title>
            <link>https://acsutils.strangled.net/functions:asin?rev=1489605207&amp;do=diff</link>
            <description>asin

math trigonometry needs_examples

angle asin(fixed x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the arcsine of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:13:27 +0000</pubDate>
        </item>
        <item>
            <title>atan</title>
            <link>https://acsutils.strangled.net/functions:atan?rev=1489605251&amp;do=diff</link>
            <description>atan

math trigonometry needs_examples

angle atan(fixed x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the arctangent of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:14:11 +0000</pubDate>
        </item>
        <item>
            <title>atof</title>
            <link>https://acsutils.strangled.net/functions:atof?rev=1492432435&amp;do=diff</link>
            <description>atof

number_parsing

fixed atof(str s)

Description

Returns s parsed as a fixed-point number. If s cannot be parsed as a fixed-point number, returns 0.

If s is too big or too small to fit into a fixed-point number, returns INT_MAX with the sign of the input.

Supports signs and</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 12:33:55 +0000</pubDate>
        </item>
        <item>
            <title>atoi</title>
            <link>https://acsutils.strangled.net/functions:atoi?rev=1492432411&amp;do=diff</link>
            <description>atoi

number_parsing

int atoi(str s)

Description

Returns s parsed as a decimal integer. If s cannot be parsed as an integer, returns 0.

If s is too big or too small to fit into int, returns INT_MAX with the sign of the input.

Supports signs and Number prefixes.
atofParseInt
Examples


atoi(&quot;123&quot;) -&gt; 123
atoi(&quot;0&quot;) -&gt; 0
atoi(&quot;999999999999&quot;) -&gt; 2147483647 // Too big
atoi(&quot;-99999999999&quot;) -&gt; -2147483647 // Too small
atoi(&quot;not a number&quot;) -&gt; 0 // Error
atoi(&quot;1.3&quot;) -&gt; 0 // Error
atoi(&quot;0xff&quot;) -&gt; 255…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 12:33:31 +0000</pubDate>
        </item>
        <item>
            <title>BotCount</title>
            <link>https://acsutils.strangled.net/functions:botcount?rev=1489784179&amp;do=diff</link>
            <description>BotCount

player needs_examples

int BotCount()

Description

Returns the amount of ZDoom bots present on the server.

It works by looping through all players and counting for how many of them PlayerIsBot returns true.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 20:56:19 +0000</pubDate>
        </item>
        <item>
            <title>CenterCursor</title>
            <link>https://acsutils.strangled.net/functions:centercursor?rev=1492272298&amp;do=diff</link>
            <description>CenterCursor

cursor needs_examples

void CenterCursor()

Description

Sets the position of the cursor to the center of the screen.

See also

SetCursorPosition</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 16:04:58 +0000</pubDate>
        </item>
        <item>
            <title>ChangeActorFlag</title>
            <link>https://acsutils.strangled.net/functions:changeactorflag?rev=1500120309&amp;do=diff</link>
            <description>ChangeActorFlag

zdoom

void ChangeActorFlag(str name, bool value)

Description

Enables or disables the specified actor flag. Zandronum equivalent of SetActorFlag.

It works by giving an item that calls A_ChangeFlag.
decorate/changeflag.txt
Examples


ChangeActorFlag(0, &quot;SOLID&quot;, true);
ChangeActorFlag(monster, &quot;SHOOTABLE&quot;, false);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Jul 2017 12:05:09 +0000</pubDate>
        </item>
        <item>
            <title>ChangeFlag</title>
            <link>https://acsutils.strangled.net/functions:changeflag?rev=1500120283&amp;do=diff</link>
            <description>ChangeFlag

zdoom

void ChangeFlag(str name, bool value)

Description

Enables or disables the specified actor flag of the activator. Zandronum equivalent of SetActorFlag. Also see ChangeActorFlag.

It works by giving an item that calls A_ChangeFlag.
decorate/changeflag.txt
Examples


ChangeFlag(&quot;SOLID&quot;, true);
ChangeFlag(&quot;SHOOTABLE&quot;, false);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Jul 2017 12:04:43 +0000</pubDate>
        </item>
        <item>
            <title>clamp</title>
            <link>https://acsutils.strangled.net/functions:clamp?rev=1489566989&amp;do=diff</link>
            <description>clamp

math

num clamp(num x, num a, num b)

num - any numeric type (int or fixed)

Description

Limits x to the range [a; b]. If x falls in the range, returns x.

If x is less than a, returns a.

If x is greater than b, returns b.

Examples


clamp(7, 6, 8) -&gt; 7
clamp(5, 6, 8) -&gt; 6
clamp(8, 6, 8) -&gt; 8

clamp(0.25, 0.2, 0.3) -&gt; 0.25
clamp(0.15, 0.2, 0.3) -&gt; 0.2
clamp(0.35, 0.2, 0.3) -&gt; 0.3</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 08:36:29 +0000</pubDate>
        </item>
        <item>
            <title>ClearHudMessage</title>
            <link>https://acsutils.strangled.net/functions:clearhudmessage?rev=1492265187&amp;do=diff</link>
            <description>ClearHudMessage

hud needs_examples

void ClearHudMessage(int id)

Description

Clears the HudMessage with the given id for the activator. Shorthand for HudMessage(s:&quot;&quot;; HUDMSG_PLAIN, id, 0, 0, 0, 0, 0).

For the HudMessageBold version, see ClearHudMessageBold.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:06:27 +0000</pubDate>
        </item>
        <item>
            <title>ClearHudMessageBold</title>
            <link>https://acsutils.strangled.net/functions:clearhudmessagebold?rev=1492265211&amp;do=diff</link>
            <description>ClearHudMessageBold

hud needs_examples

void ClearHudMessageBold(int id)

Description

Clears the HudMessage with the given id for all players (serverside) or the client (clientside). Shorthand for HudMessageBold(s:&quot;&quot;; HUDMSG_PLAIN, id, 0, 0, 0, 0, 0).

For the non-bold</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:06:51 +0000</pubDate>
        </item>
        <item>
            <title>ClientCount</title>
            <link>https://acsutils.strangled.net/functions:clientcount?rev=1492265283&amp;do=diff</link>
            <description>ClientCount

player needs_examples

int ClientCount()

Description

Returns the amount of clients present on the server.

It works by looping through all players and counting for how many of them PlayerIsConnected returns true.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:08:03 +0000</pubDate>
        </item>
        <item>
            <title>cmp</title>
            <link>https://acsutils.strangled.net/functions:cmp?rev=1489566958&amp;do=diff</link>
            <description>cmp

math

int cmp(num a, num b)

num - any numeric type (int or fixed)

Description

Compares two numbers and returns the result:

	*  1 -- a is greater than b
	*  0 -- a is equal to b
	*  -1 -- a is less than b

Examples


cmp(1, 2) -&gt; -1
cmp(1, 1) -&gt; 0
cmp(2, 1) -&gt; 1</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 08:35:58 +0000</pubDate>
        </item>
        <item>
            <title>cond</title>
            <link>https://acsutils.strangled.net/functions:cond?rev=1497530072&amp;do=diff</link>
            <description>cond

math acs_enhancements

any cond(bool condition, any a, any b)

any - any type (int, fixed or str)

Description

If condition is true, returns a. Otherwise, returns b.

It simulates the ?: operator from C.



int y = cond(x, DoSomething(), DoSomethingElse())


DoSomething()DoSomethingElse()

BCCGDCC?:

Examples</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 15 Jun 2017 12:34:32 +0000</pubDate>
        </item>
        <item>
            <title>ConsolePlayerInGame</title>
            <link>https://acsutils.strangled.net/functions:consoleplayeringame?rev=1497360682&amp;do=diff</link>
            <description>ConsolePlayerInGame

player needs_examples

bool ConsolePlayerInGame()

Description

Returns true if ConsolePlayer is in game. Shorthand for PlayerInGame(ConsolePlayerNumber()).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:31:22 +0000</pubDate>
        </item>
        <item>
            <title>ConsolePlayerName</title>
            <link>https://acsutils.strangled.net/functions:consoleplayername?rev=1497360597&amp;do=diff</link>
            <description>ConsolePlayerName

player needs_examples

str ConsolePlayerName()

Description

Returns the name of ConsolePlayer. Shorthand for PlayerName(ConsolePlayerNumber()).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:29:57 +0000</pubDate>
        </item>
        <item>
            <title>ConsolePlayerTeam</title>
            <link>https://acsutils.strangled.net/functions:consoleplayerteam?rev=1497356950&amp;do=diff</link>
            <description>ConsolePlayerTeam

player needs_examples

int ConsolePlayerTeam()

Description

Returns the team that ConsolePlayer belongs to. Shorthand for GetPlayerTeam(ConsolePlayerNumber()).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:29:10 +0000</pubDate>
        </item>
        <item>
            <title>cosec</title>
            <link>https://acsutils.strangled.net/functions:cosec?rev=1489605110&amp;do=diff</link>
            <description>cosec

math trigonometry needs_examples

fixed cosec(angle x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the cosecant of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:11:50 +0000</pubDate>
        </item>
        <item>
            <title>cot</title>
            <link>https://acsutils.strangled.net/functions:cot?rev=1489605087&amp;do=diff</link>
            <description>cot

math trigonometry needs_examples

fixed cot(angle x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the cotangent of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:11:27 +0000</pubDate>
        </item>
        <item>
            <title>CursorDeltaX</title>
            <link>https://acsutils.strangled.net/functions:cursordeltax?rev=1496070528&amp;do=diff</link>
            <description>CursorDeltaX

cursor

fixed CursorDeltaX()

Description

Returns the difference between the current cursor X position and the position during the previous tic.

Note that if the cursor is moved towards the edge of the screen in a non-wrapping mode, the position difference will be 0. To measure the velocity of the attempted mouse motion, use</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 29 May 2017 15:08:48 +0000</pubDate>
        </item>
        <item>
            <title>CursorDeltaY</title>
            <link>https://acsutils.strangled.net/functions:cursordeltay?rev=1496070513&amp;do=diff</link>
            <description>CursorDeltaY

cursor needs_examples

fixed CursorDeltaY()

Description

Returns the difference between the current cursor Y position and the position during the previous tic.

Note that if the cursor is moved towards the edge of the screen in a non-wrapping mode, the position difference will be 0. To measure the velocity of the attempted mouse motion, use</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 29 May 2017 15:08:33 +0000</pubDate>
        </item>
        <item>
            <title>CursorMotionX</title>
            <link>https://acsutils.strangled.net/functions:cursormotionx?rev=1492272121&amp;do=diff</link>
            <description>CursorMotionX

cursor needs_examples

fixed CursorMotionX()

Description

Returns the X coordinate of the current motion vector of the Cursor.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 16:02:01 +0000</pubDate>
        </item>
        <item>
            <title>CursorMotionY</title>
            <link>https://acsutils.strangled.net/functions:cursormotiony?rev=1492272134&amp;do=diff</link>
            <description>CursorMotionY

cursor needs_examples

fixed CursorMotionY()

Description

Returns the Y coordinate of the current motion vector of the Cursor.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 16:02:14 +0000</pubDate>
        </item>
        <item>
            <title>CursorX</title>
            <link>https://acsutils.strangled.net/functions:cursorx?rev=1566777045&amp;do=diff</link>
            <description>CursorX</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 25 Aug 2019 23:50:45 +0000</pubDate>
        </item>
        <item>
            <title>CursorX/CursorY</title>
            <link>https://acsutils.strangled.net/functions:cursorxy?rev=1566776981&amp;do=diff</link>
            <description>CursorX/CursorY


fixed CursorX()
fixed CursorY()


Description

These functions return the current X and Y position of the mouse_cursor, respectively.

Examples


print(s:&quot;The cursor is currently at &quot;, f:CursorX(), s:&quot; &quot;, f:CursorY());</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 25 Aug 2019 23:49:41 +0000</pubDate>
        </item>
        <item>
            <title>CursorY</title>
            <link>https://acsutils.strangled.net/functions:cursory?rev=1566777063&amp;do=diff</link>
            <description>CursorY</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 25 Aug 2019 23:51:03 +0000</pubDate>
        </item>
        <item>
            <title>DeadSpectatorCount</title>
            <link>https://acsutils.strangled.net/functions:deadspectatorcount?rev=1497361438&amp;do=diff</link>
            <description>DeadSpectatorCount

player needs_examples

int DeadSpectatorsCount()

Description

Returns the amount of dead spectators present on the server.

It works by looping through all players and counting for how many of them PlayerIsDeadSpectator returns true.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:43:58 +0000</pubDate>
        </item>
        <item>
            <title>deg2ang</title>
            <link>https://acsutils.strangled.net/functions:deg2ang?rev=1492429490&amp;do=diff</link>
            <description>deg2ang

math units needs_examples

angle deg2ang(fixed degrees)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Converts degrees to a ZDoom angle and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:44:50 +0000</pubDate>
        </item>
        <item>
            <title>deg2rad</title>
            <link>https://acsutils.strangled.net/functions:deg2rad?rev=1492429643&amp;do=diff</link>
            <description>deg2rad

math units needs_examples

fixed deg2rad(fixed degrees)

Description

Converts degrees to radians and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:47:23 +0000</pubDate>
        </item>
        <item>
            <title>dot2</title>
            <link>https://acsutils.strangled.net/functions:dot2?rev=1489605416&amp;do=diff</link>
            <description>dot2

math vectors needs_examples

fixed dot2(fixed x1, fixed y1, fixed x2, fixed y2)

Description

Returns the dot product of two 2D vectors.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:16:56 +0000</pubDate>
        </item>
        <item>
            <title>dot3</title>
            <link>https://acsutils.strangled.net/functions:dot3?rev=1489605451&amp;do=diff</link>
            <description>dot3

math vectors needs_examples

fixed dot3(fixed x1, fixed y1, fixed z1, fixed x2, fixed y2, fixed z2)

Description

Returns the dot product of two 3D vectors.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:17:31 +0000</pubDate>
        </item>
        <item>
            <title>fpow</title>
            <link>https://acsutils.strangled.net/functions:fpow?rev=1492265685&amp;do=diff</link>
            <description>fpow

math

fixed fpow(fixed x, int power)

Description

Returns x raised to the integer power. Only positive powers are supported.

For an integer version, see ipow.

Examples


fpow(2.0, 3) -&gt; 8.0
fpow(2.0, 1) -&gt; 2.0
fpos(2.0, 0) -&gt; 1.0

fpow(0.5, 0) -&gt; 1.0
fpow(0.5, 1) -&gt; 0.5
fpow(0.5, 2) -&gt; 0.25
fpow(0.5, 3) -&gt; 0.125</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:14:45 +0000</pubDate>
        </item>
        <item>
            <title>fract</title>
            <link>https://acsutils.strangled.net/functions:fract?rev=1500121002&amp;do=diff</link>
            <description>fract

fixed fract(fixed x)

Description

Returns the fractional part of x with the sign of x.

Examples


fract(1.2) -&gt; 0.2;
fract(-123.456) -&gt; -0.456;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Jul 2017 12:16:42 +0000</pubDate>
        </item>
        <item>
            <title>gcf</title>
            <link>https://acsutils.strangled.net/functions:gcf?rev=1489568286&amp;do=diff</link>
            <description>gcf

math numerical_algorithms

num gcf(num a, num b)

num - any numeric type (int or fixed)

Description

Returns the greatest common factor of two numbers.

The result will be negative if one or both arguments are negative.

Examples


gcf(18,   24) -&gt; 6
gcf(-18,  24) -&gt; -6
gcf(18,  -24) -&gt; -6
gcf(-18, -24) -&gt; -6

gcf(18.0,   24.0) -&gt; 6.0
gcf(-18.0,  24.0) -&gt; -6.0
gcf(18.0,  -24.0) -&gt; -6.0
gcf(-18.0, -24.0) -&gt; -6.0</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 08:58:06 +0000</pubDate>
        </item>
        <item>
            <title>GetActorVelocity</title>
            <link>https://acsutils.strangled.net/functions:getactorvelocity?rev=1497361798&amp;do=diff</link>
            <description>GetActorVelocity

zdoom math

fixed GetActorVelocity(int tid)

Description

Returns the length of the 3D velocity vector of the actor. Shorthand for VectorLength3D(GetActorVelX(tid), GetActorVelY(tid), GetActorVelZ(tid)).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:49:58 +0000</pubDate>
        </item>
        <item>
            <title>GetActorXYVelocity</title>
            <link>https://acsutils.strangled.net/functions:getactorxyvelocity?rev=1497361897&amp;do=diff</link>
            <description>GetActorXYVelocity

zdoom math

fixed GetActorVelocity(int tid)

Description

Returns the length of the 2D (XY) velocity vector of the actor. Shorthand for VectorLength(GetActorVelX(tid), GetActorVelY(tid)).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:51:37 +0000</pubDate>
        </item>
        <item>
            <title>GetAspectRatio</title>
            <link>https://acsutils.strangled.net/functions:getaspectratio?rev=1492449461&amp;do=diff</link>
            <description>GetAspectRatio

info hud widescreen needs_examples

fixed GetAspectRatio()

Description

Returns the aspect ratio that ZDoom is currently using for HudMessages. See HUD coordinate system.

	*  ASPECT_4_3
	*  ASPECT_16_9
	*  ASPECT_16_10
	*  ASPECT_17_10
	*  ASPECT_5_4

Every aspect ratio constant is a fixed-point number equal to the corresponding ratio, for example,</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:17:41 +0000</pubDate>
        </item>
        <item>
            <title>GetColorCodeAt</title>
            <link>https://acsutils.strangled.net/functions:getcolorcodeat?rev=1499612196&amp;do=diff</link>
            <description>GetColorCodeAt

string zdoom

str GetColorCodeAt(str s, int i)

Description

Returns the full text of the colorcode at position i. If there is no colorcode, returns an empty string. Shorthand for StrSlice(s, i, SkipColorCodeAt(s, i));

Examples

Print all colorcodes in a string:


int len = StrLen(s);
int i = 0;
while (i &lt; len)
{
    str cc = GetColorCodeAt(s, i);
    if (!StrIsEmpty(cc))
        print(s:StrSlice(cc, 1, StrLen(cc)));
    i += StrLen(cc);
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:56:36 +0000</pubDate>
        </item>
        <item>
            <title>GetCVarFixed</title>
            <link>https://acsutils.strangled.net/functions:getcvarfixed?rev=1489763491&amp;do=diff</link>
            <description>GetCVarFixed

zdoom cvar</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 15:11:31 +0000</pubDate>
        </item>
        <item>
            <title>GetGravityG</title>
            <link>https://acsutils.strangled.net/functions:getgravityg?rev=1499610793&amp;do=diff</link>
            <description>GetGravityG

zdoom units needs_examples

fixed GetGravityG()

Description

Reads sv_gravity and returns current gravity in standard acceleration units instead of sv_gravity units.
1.0
This function handles extremely large sv_gravity units by using IntDiv when sv_gravity is greater than SHORT_MAX, and using FixedDiv otherwise to preserve precision.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:33:13 +0000</pubDate>
        </item>
        <item>
            <title>GetPlayerTeam</title>
            <link>https://acsutils.strangled.net/functions:getplayerteam?rev=1497362389&amp;do=diff</link>
            <description>GetPlayerTeam

player needs_examples

int GetPlayerTeam(int player)

Description

Returns the team the specified player belongs to. Shorthand for GetPlayerInfo(player, PLAYERINFO_TEAM).

Not to be confused with PlayerTeam, which returns the activator&#039;s team.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:59:49 +0000</pubDate>
        </item>
        <item>
            <title>GetPortName</title>
            <link>https://acsutils.strangled.net/functions:getportname?rev=1489782139&amp;do=diff</link>
            <description>GetPortName

info

str GetPortName()

Description

Returns the name of the port the mod is being played in.

Possible return values are:

	*  &quot;ZDoom&quot;
	*  &quot;GZDoom&quot;
	*  &quot;Zandronum&quot;

For a description of how ports are identified, see IdentifySourcePort.
IdentifySourcePort
Examples


print(s:&quot;You are playing this mod in &quot;, s:GetPortName());</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 20:22:19 +0000</pubDate>
        </item>
        <item>
            <title>GetSyncVar</title>
            <link>https://acsutils.strangled.net/functions:getsyncvar?rev=1500214868&amp;do=diff</link>
            <description>GetSyncVar

zandronum needs_examples

num GetSyncVar(int tid)

num - any numeric type (int or fixed)

Description

Returns the variable synchronized using SyncVariable. If the variable has not been synchronized even once yet, returns 0.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 16 Jul 2017 14:21:08 +0000</pubDate>
        </item>
        <item>
            <title>GetSyncVarDefault</title>
            <link>https://acsutils.strangled.net/functions:getsyncvardefault?rev=1500215443&amp;do=diff</link>
            <description>GetSyncVarDefault

zandronum needs_examples

num GetSyncVarDefault(int tid, num defaultvalue)

num - any numeric type (int or fixed)

Description

Returns the variable synchronized using SyncVariable. If the variable has not been synchronized even once yet, returns the specified default value.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 16 Jul 2017 14:30:43 +0000</pubDate>
        </item>
        <item>
            <title>GetUserCVarFixed</title>
            <link>https://acsutils.strangled.net/functions:getusercvarfixed?rev=1497355874&amp;do=diff</link>
            <description>GetUserCVarFixed

zdoom cvar</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:11:14 +0000</pubDate>
        </item>
        <item>
            <title>grav2accel</title>
            <link>https://acsutils.strangled.net/functions:grav2accel?rev=1492429913&amp;do=diff</link>
            <description>grav2accel

math units

fixed grav2accel(fixed sv_gravity)

Description

Converts sv_gravity units to acceleration (mapunits^2 per tic).
GetCVarFixedsv_gravity
Examples


grav2accel(800.0) -&gt; 1.0;
grav2accel(0) -&gt; 0.0;
grav2accel(1600.0) -&gt; 2.0;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:51:53 +0000</pubDate>
        </item>
        <item>
            <title>HasColorCodes</title>
            <link>https://acsutils.strangled.net/functions:hascolorcodes?rev=1489941537&amp;do=diff</link>
            <description>HasColorCodes

string color_codes

bool HasColorCodes(str s)

Description

Returns true if the string contains color codes anywhere.

Examples


HasColorCodes(&quot;\cghello&quot;) -&gt; true
HasColorCodes(&quot;hello&quot;) -&gt; false
HasColorCodes(&quot;hello\cg&quot;) -&gt; true</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 19 Mar 2017 16:38:57 +0000</pubDate>
        </item>
        <item>
            <title>HasRoomFor</title>
            <link>https://acsutils.strangled.net/functions:hasroomfor?rev=1497608439&amp;do=diff</link>
            <description>HasRoomFor

zdoom needs_examples

bool HasRoomFor(str actorname, fixed x, fixed y, fixed z)

Description

Returns true if the actor of the specified type can fit if occupying the specified point.

This function works by attempting to spawn an actor at the specified position, and immediately removing it if successful.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 16 Jun 2017 10:20:39 +0000</pubDate>
        </item>
        <item>
            <title>height2jumpz</title>
            <link>https://acsutils.strangled.net/functions:height2jumpz?rev=1499610435&amp;do=diff</link>
            <description>height2jumpz

units zdoom

fixed height2jumpz(fixed height, fixed gravity)

Description

Converts jump height to JumpZ, assuming specified gravity. 

Gravity is specified as acceleration, not as sv_gravity units.
1.0GetGravityG
Conversion formula

height = 0.5 * jumpz^2 / gravity

Examples


int jumpz = height2jumpz(8.0, 1.0);
print(s:&quot;To jump 8 mapunits high in normal gravity, you need to set JumpZ to &quot;, f:jumpz);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:27:15 +0000</pubDate>
        </item>
        <item>
            <title>HudBorderXFor</title>
            <link>https://acsutils.strangled.net/functions:hudborderxfor?rev=1492523055&amp;do=diff</link>
            <description>HudBorderXFor

hud widescreen needs_examples

fixed HudBorderXFor(fixed width)

Description

Returns the width of the horizontal screen border for the specified HUD width in HUD coordinate system. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:44:15 +0000</pubDate>
        </item>
        <item>
            <title>HudBorderYFor</title>
            <link>https://acsutils.strangled.net/functions:hudborderyfor?rev=1492523079&amp;do=diff</link>
            <description>HudBorderYFor

hud widescreen needs_examples

fixed HudBorderYFor(fixed height)

Description

Returns the height of the vertical screen border for the specified HUD height in HUD coordinate system. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:44:39 +0000</pubDate>
        </item>
        <item>
            <title>HudBottom</title>
            <link>https://acsutils.strangled.net/functions:hudbottom?rev=1492523297&amp;do=diff</link>
            <description>HudBottom

hud widescreen needs_examples

fixed HudBottom()

Description

Returns the Y of the bottom screen boundary in HUD coordinate system. Assumes HUD height to be that specified in HUD Library state. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:48:17 +0000</pubDate>
        </item>
        <item>
            <title>HudBottomFor</title>
            <link>https://acsutils.strangled.net/functions:hudbottomfor?rev=1492522979&amp;do=diff</link>
            <description>HudBottomFor

hud widescreen needs_examples

fixed HudBottomFor(fixed height)

Description

Returns the Y of the bottom screen boundary for the specified HUD height in HUD coordinate system. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:42:59 +0000</pubDate>
        </item>
        <item>
            <title>HudClearStateStack</title>
            <link>https://acsutils.strangled.net/functions:hudclearstatestack?rev=1492447399&amp;do=diff</link>
            <description>HudClearStateStack

hud_library needs_examples

void HudClearStateStack()

This is a HUD Library function.

Description

Clears HUD Library state stack. Does not affect current HUD Library State.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:43:19 +0000</pubDate>
        </item>
        <item>
            <title>HudDrawImage</title>
            <link>https://acsutils.strangled.net/functions:huddrawimage?rev=1492521551&amp;do=diff</link>
            <description>HudDrawImage

hud_library

void HudDrawText(int id, str image)

This is a HUD Library function.

Description

Draws an image HudMessage with the specified HudMessage ID, taking HUD Library State into account.
SetHudSizeSetFont</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:19:11 +0000</pubDate>
        </item>
        <item>
            <title>HudDrawText</title>
            <link>https://acsutils.strangled.net/functions:huddrawtext?rev=1492521544&amp;do=diff</link>
            <description>HudDrawText

hud_library

void HudDrawText(int id, str text)

This is a HUD Library function.

Description

Draws a text HudMessage with the specified HudMessage ID, taking HUD Library State into account.
SetHudSizeSetFont</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:19:04 +0000</pubDate>
        </item>
        <item>
            <title>HudLeft</title>
            <link>https://acsutils.strangled.net/functions:hudleft?rev=1492523198&amp;do=diff</link>
            <description>HudLeft

hud widescreen needs_examples

fixed HudLeft()

Description

Returns the X of the left screen boundary in HUD coordinate system. Assumes HUD width to be that specified in HUD Library state. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:46:38 +0000</pubDate>
        </item>
        <item>
            <title>HudLeftFor</title>
            <link>https://acsutils.strangled.net/functions:hudleftfor?rev=1492522910&amp;do=diff</link>
            <description>HudLeftFor

hud widescreen needs_examples

fixed HudLeftFor(fixed width)

Description

Returns the X of the left screen boundary for the specified HUD width in HUD coordinate system. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:41:50 +0000</pubDate>
        </item>
        <item>
            <title>HudPopState</title>
            <link>https://acsutils.strangled.net/functions:hudpopstate?rev=1492447278&amp;do=diff</link>
            <description>HudPopState

hud_library

void HudPopState()

This is a HUD Library function.

Description

Restores saved HUD Library State from the state stack and removes it from the stack.

If the stack is empty, a ProgramError is emitted.

Examples


HudPushState();
// Change state
HudPopState(); // Back to saved state.


This function is not affected by current HUD Library state and doesn&#039;t overwrite it:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:41:18 +0000</pubDate>
        </item>
        <item>
            <title>HudPushState</title>
            <link>https://acsutils.strangled.net/functions:hudpushstate?rev=1492447287&amp;do=diff</link>
            <description>HudPushState

hud_library

void HudPushState()

This is a HUD Library function.

Description

Saves current HUD Library State to state stack. 

If the stack is full, a LimitError is emitted.
HudPopState
Examples


HudPushState();
// Change state
HudPopState(); // Back to saved state.


This function is not affected by current HUD Library state and doesn&#039;t overwrite it:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:41:27 +0000</pubDate>
        </item>
        <item>
            <title>HudResetState</title>
            <link>https://acsutils.strangled.net/functions:hudresetstate?rev=1492446837&amp;do=diff</link>
            <description>HudResetState

hud_library

void HudResetState()

This is a HUD Library function.

Description

Resets all HUD Library State to defaults. Should be used at the beginning of any drawing to clear any state left by previously run scripts, just like SetHudSize and SetFont are used for that purpose.

Examples


HudResetState();
HudSetPoint(320.0, 240.0);
HudDrawText(1, &quot;Hello&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:33:57 +0000</pubDate>
        </item>
        <item>
            <title>HudRight</title>
            <link>https://acsutils.strangled.net/functions:hudright?rev=1492523223&amp;do=diff</link>
            <description>HudRight

hud widescreen needs_examples

fixed HudRight()

Description

Returns the X of the right screen boundary in HUD coordinate system. Assumes HUD width to be that specified in HUD Library state. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:47:03 +0000</pubDate>
        </item>
        <item>
            <title>HudRightFor</title>
            <link>https://acsutils.strangled.net/functions:hudrightfor?rev=1492522925&amp;do=diff</link>
            <description>HudRightFor

hud widescreen needs_examples

fixed HudRightFor(fixed width)

Description

Returns the X of the right screen boundary for the specified HUD width in HUD coordinate system. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:42:05 +0000</pubDate>
        </item>
        <item>
            <title>HudSet2DOffset</title>
            <link>https://acsutils.strangled.net/functions:hudset2doffset?rev=1492446849&amp;do=diff</link>
            <description>HudSet2DOffset

hud_library

void HudSet2DOffset(fixed x, fixed y)

This is a HUD Library function.

Description

Sets 2D offset in 3D mode.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:34:09 +0000</pubDate>
        </item>
        <item>
            <title>HudSetAlpha</title>
            <link>https://acsutils.strangled.net/functions:hudsetalpha?rev=1492446886&amp;do=diff</link>
            <description>HudSetAlpha

hud_library

void HudSetAlpha(fixed alpha)

This is a HUD Library function.

Description

Sets message alpha (opaqueness) value.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:34:46 +0000</pubDate>
        </item>
        <item>
            <title>HudSetAppearTime</title>
            <link>https://acsutils.strangled.net/functions:hudsetappeartime?rev=1492440438&amp;do=diff</link>
            <description>HudSetAppearTime

void HudSetAppearTime(fixed seconds)

This is a HUD Library function.

Description

Sets appearance time in seconds.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:47:18 +0000</pubDate>
        </item>
        <item>
            <title>HudSetAutoDistanceScale</title>
            <link>https://acsutils.strangled.net/functions:hudsetautodistancescale?rev=1492441738&amp;do=diff</link>
            <description>HudSetAutoDistanceScale

void HudSetAutoDistanceScale(fixed x, fixed y)

This is a HUD Library function.

Description

Sets auto distance scaling flag.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:08:58 +0000</pubDate>
        </item>
        <item>
            <title>HudSetBlendStyle</title>
            <link>https://acsutils.strangled.net/functions:hudsetblendstyle?rev=1492440645&amp;do=diff</link>
            <description>HudSetBlendStyle

void HudSetBlendStyle(int blendstyle)

This is a HUD Library function.

Description

Sets blend style.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:50:45 +0000</pubDate>
        </item>
        <item>
            <title>HudSetCameraActor</title>
            <link>https://acsutils.strangled.net/functions:hudsetcameraactor?rev=1492442521&amp;do=diff</link>
            <description>HudSetCameraActor

void HudSetCameraActor(int tid)

This is a HUD Library function.

Description

Sets camera position and direction to match those of the specified actor. 

See HudSetCameraActorAdvanced for what tweaks this function performs.

Examples


while (IsPlaying())
{
    HudResetState();
    HudSetCameraActor(0);
    Draw3DStuff();
    Delay(1);
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:22:01 +0000</pubDate>
        </item>
        <item>
            <title>HudSetCameraActorAdvanced</title>
            <link>https://acsutils.strangled.net/functions:hudsetcameraactoradvanced?rev=1492449245&amp;do=diff</link>
            <description>HudSetCameraActorAdvanced

void HudSetCameraActorAdvanced(int tid, int flags)

This is a HUD Library function.

Description

Sets camera position and direction to match those of the specified actor. Advanced version of HudSetCameraActor.

Takes the following flags:

	*  HUD_CAMERAACTOR_NOPOSITION -- don&#039;t set camera position.
	*  HUD_CAMERAACTOR_NODIRECTION</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:14:05 +0000</pubDate>
        </item>
        <item>
            <title>HudSetCameraAngles</title>
            <link>https://acsutils.strangled.net/functions:hudsetcameraangles?rev=1492441357&amp;do=diff</link>
            <description>HudSetCameraAngles

void HudSetCameraAngles(fixed angle, fixed pitch)

This is a HUD Library function.

Description

Sets camera direction using two angles.
HudSetCameraAngles(GetActorAngle(tid), -GetActorPitch(tid))HudSetCameraActor</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:02:37 +0000</pubDate>
        </item>
        <item>
            <title>HudSetCameraPosition</title>
            <link>https://acsutils.strangled.net/functions:hudsetcameraposition?rev=1492441253&amp;do=diff</link>
            <description>HudSetCameraPosition

void HudSetCameraPosition(fixed x, fixed y, fixed z)

This is a HUD Library function.

Description

Sets 3D camera position.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:00:53 +0000</pubDate>
        </item>
        <item>
            <title>HudSetCenterText</title>
            <link>https://acsutils.strangled.net/functions:hudsetcentertext?rev=1492441162&amp;do=diff</link>
            <description>HudSetCenterText

void HudSetCenterText(bool enabled)

This is a HUD Library function.

Description

Sets center text flag.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:59:22 +0000</pubDate>
        </item>
        <item>
            <title>HudSetDisappearTime</title>
            <link>https://acsutils.strangled.net/functions:hudsetdisappeartime?rev=1492440544&amp;do=diff</link>
            <description>HudSetDisappearTime

void HudSetDisappearTime(fixed seconds)

This is a HUD Library function.

Description

Sets disappearance time in seconds.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:49:04 +0000</pubDate>
        </item>
        <item>
            <title>HudSetExcludeStatusBar</title>
            <link>https://acsutils.strangled.net/functions:hudsetexcludestatusbar?rev=1492448533&amp;do=diff</link>
            <description>HudSetExcludeStatusBar

hud_library

void HudSetExcludeStatusBar(fixed width, fixed height)

This is a HUD Library function.

Description

Sets exclude status bar flag. This is equivalent to the third argument to SetHudSize.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:02:13 +0000</pubDate>
        </item>
        <item>
            <title>HudSetInvScale</title>
            <link>https://acsutils.strangled.net/functions:hudsetinvscale?rev=1492439892&amp;do=diff</link>
            <description>HudSetInvScale

void HudSetInvScale(fixed invscale)

This is a HUD Library function.

Description

Sets both X and Y scale to the same value. Uses 1 / scale to set scale.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:38:12 +0000</pubDate>
        </item>
        <item>
            <title>HudSetInvScaleXY</title>
            <link>https://acsutils.strangled.net/functions:hudsetinvscalexy?rev=1492440172&amp;do=diff</link>
            <description>HudSetInvScaleXY

void HudSetInvScaleXY(fixed xinvscale, fixed yinvscale)

This is a HUD Library function.

Description

Sets X and Y scale. Uses 1 / scale to set scale.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:42:52 +0000</pubDate>
        </item>
        <item>
            <title>HudSetLayer</title>
            <link>https://acsutils.strangled.net/functions:hudsetlayer?rev=1492440842&amp;do=diff</link>
            <description>HudSetLayer

void HudSetLayer(int layer)

This is a HUD Library function.

Description

Sets HUD layer to draw the message at.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:54:02 +0000</pubDate>
        </item>
        <item>
            <title>HudSetLogMessage</title>
            <link>https://acsutils.strangled.net/functions:hudsetlogmessage?rev=1492441210&amp;do=diff</link>
            <description>HudSetLogMessage

void HudSetLogMessage(bool enabled)

This is a HUD Library function.

Description

Sets logging flag for text.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:00:10 +0000</pubDate>
        </item>
        <item>
            <title>HudSetPoint</title>
            <link>https://acsutils.strangled.net/functions:hudsetpoint?rev=1492439531&amp;do=diff</link>
            <description>HudSetPoint

hud_library

void HudSetPoint(fixed x, fixed y)

This is a HUD Library function.

Description

Sets the current 2D position to draw the message at and switches from 3D to 2D mode if mode was set to 3D.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:32:11 +0000</pubDate>
        </item>
        <item>
            <title>HudSetPoint3D</title>
            <link>https://acsutils.strangled.net/functions:hudsetpoint3d?rev=1492439572&amp;do=diff</link>
            <description>HudSetPoint3D

hud_library

void HudSetPoint3D(fixed x, fixed y, fixed z)

This is a HUD Library function.

Description

Sets the current 3D position to draw the message at and switches from 2D to 3D mode if mode was set to 2D.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:32:52 +0000</pubDate>
        </item>
        <item>
            <title>HudSetProjectionMode</title>
            <link>https://acsutils.strangled.net/functions:hudsetprojectionmode?rev=1492441699&amp;do=diff</link>
            <description>HudSetProjectionMode

void HudSetProjectionMode(int mode)

This is a HUD Library function.

Description

Sets projection mode.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:08:19 +0000</pubDate>
        </item>
        <item>
            <title>HudSetScale</title>
            <link>https://acsutils.strangled.net/functions:hudsetscale?rev=1492439777&amp;do=diff</link>
            <description>HudSetScale

void HudSetScale(fixed scale)

This is a HUD Library function.

Description

Sets both X and Y scale to the same value.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:36:17 +0000</pubDate>
        </item>
        <item>
            <title>HudSetScaleXY</title>
            <link>https://acsutils.strangled.net/functions:hudsetscalexy?rev=1492440128&amp;do=diff</link>
            <description>HudSetScaleXY

void HudSetScaleXY(fixed xscale, fixed yscale)

This is a HUD Library function.

Description

Sets X and Y scale.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:42:08 +0000</pubDate>
        </item>
        <item>
            <title>HudSetShowIn3DView</title>
            <link>https://acsutils.strangled.net/functions:hudsetshowin3dview?rev=1492440732&amp;do=diff</link>
            <description>HudSetShowIn3DView

void HudSetShowIn3DView(bool show)

This is a HUD Library function.

Description

Sets show in 3D view flag.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:52:12 +0000</pubDate>
        </item>
        <item>
            <title>HudSetShowOnFullAutomap</title>
            <link>https://acsutils.strangled.net/functions:hudsetshowonfullautomap?rev=1492440796&amp;do=diff</link>
            <description>HudSetShowOnFullAutomap

void HudSetShowOnFullAutomap(bool show)

This is a HUD Library function.

Description

Sets show on full automap flag.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:53:16 +0000</pubDate>
        </item>
        <item>
            <title>HudSetShowOnOverlayAutomap</title>
            <link>https://acsutils.strangled.net/functions:hudsetshowonoverlayautomap?rev=1492440767&amp;do=diff</link>
            <description>HudSetShowOnOverlayAutomap

void HudSetShowOnOverlayAutomap(bool show)

This is a HUD Library function.

Description

Sets show on overlay automap flag.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:52:47 +0000</pubDate>
        </item>
        <item>
            <title>HudSetShowToEveryone</title>
            <link>https://acsutils.strangled.net/functions:hudsetshowtoeveryone?rev=1492448002&amp;do=diff</link>
            <description>HudSetShowToEveryone

void HudSetShowToEveryone(bool show)

This is a HUD Library function.

Description

Sets show to everyone flag.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:53:22 +0000</pubDate>
        </item>
        <item>
            <title>HudSetStayTime</title>
            <link>https://acsutils.strangled.net/functions:hudsetstaytime?rev=1492440490&amp;do=diff</link>
            <description>HudSetStayTime

void HudSetDtayTime(fixed seconds)

This is a HUD Library function.

Description

Sets stay time in seconds.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:48:10 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextColor</title>
            <link>https://acsutils.strangled.net/functions:hudsettextcolor?rev=1492440998&amp;do=diff</link>
            <description>HudSetTextColor

void HudSetTextColor(int color)

This is a HUD Library function.

Description

Sets text color to use when drawing text. To set a color not available as a CR_* constant, use HudSetTextColorString.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:56:38 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextColorString</title>
            <link>https://acsutils.strangled.net/functions:hudsettextcolorstring?rev=1492441041&amp;do=diff</link>
            <description>HudSetTextColorString

void HudSetTextColorString(str colorname)

This is a HUD Library function.

Description

Sets text color using color name. To set text color using a CR_* constant, use HudSetTextColor.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:57:21 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextFont</title>
            <link>https://acsutils.strangled.net/functions:hudsettextfont?rev=1492440910&amp;do=diff</link>
            <description>HudSetTextFont

void HudSetTextFont(str fontname)

This is a HUD Library function.

Description

Sets the font to use when drawing text. This function is the HUD Library equivalent of SetFont.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:55:10 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextOrigin</title>
            <link>https://acsutils.strangled.net/functions:hudsettextorigin?rev=1492520677&amp;do=diff</link>
            <description>HudSetTextOrigin

void HudSetTextOrigin(int originx, int originy)

This is a HUD Library function.

Description

Sets X and Y text origin setting for text.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:04:37 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextOriginX</title>
            <link>https://acsutils.strangled.net/functions:hudsettextoriginx?rev=1492520718&amp;do=diff</link>
            <description>HudSetTextOriginX

void HudSetTextOriginX(int originx)

This is a HUD Library function.

Description

Sets only X text origin.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:05:18 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextOriginY</title>
            <link>https://acsutils.strangled.net/functions:hudsettextoriginy?rev=1492520729&amp;do=diff</link>
            <description>HudSetTextOriginY

void HudSetTextOriginY(int originy)

This is a HUD Library function.

Description

Sets only Y text origin.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:05:29 +0000</pubDate>
        </item>
        <item>
            <title>HudSetTextTypeOn</title>
            <link>https://acsutils.strangled.net/functions:hudsettexttypeon?rev=1492441102&amp;do=diff</link>
            <description>HudSetTextTypeOn

void HudSetTextTypeOn(bool enabled)

This is a HUD Library function.

Description

Sets type-on flag for text.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:58:22 +0000</pubDate>
        </item>
        <item>
            <title>HudSetVirtualSize</title>
            <link>https://acsutils.strangled.net/functions:hudsetvirtualsize?rev=1492444137&amp;do=diff</link>
            <description>HudSetVirtualSize

void HudSetVirtualSize(fixed width, fixed height)

This is a HUD Library function.

Description

Sets virtual screen size. This is the HUD Library equivalent of SetHudSize.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 15:48:57 +0000</pubDate>
        </item>
        <item>
            <title>HudSetWordWrap</title>
            <link>https://acsutils.strangled.net/functions:hudsetwordwrap?rev=1492441126&amp;do=diff</link>
            <description>HudSetWordWrap

void HudSetWordWrap(bool enabled)

This is a HUD Library function.

Description

Sets word wrap flag for text.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 14:58:46 +0000</pubDate>
        </item>
        <item>
            <title>HudTop</title>
            <link>https://acsutils.strangled.net/functions:hudtop?rev=1492523266&amp;do=diff</link>
            <description>HudTop

hud widescreen needs_examples

fixed HudTop()

Description

Returns the Y of the top screen boundary in HUD coordinate system. Assumes HUD height to be that specified in HUD Library state. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:47:46 +0000</pubDate>
        </item>
        <item>
            <title>HudTopFor</title>
            <link>https://acsutils.strangled.net/functions:hudtopfor?rev=1492522989&amp;do=diff</link>
            <description>HudTopFor

hud widescreen needs_examples

fixed HudTopFor(fixed height)

Description

Returns the Y of the top screen boundary for the specified HUD height in HUD coordinate system. Uses GetAspectRatio to calculate it for current aspect ratio.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 18 Apr 2017 13:43:09 +0000</pubDate>
        </item>
        <item>
            <title>HudUseDefaultSize</title>
            <link>https://acsutils.strangled.net/functions:hudusedefaultsize?rev=1492448219&amp;do=diff</link>
            <description>HudUseDefaultSize

void HudUseDefaultSize(fixed width, fixed height)

This is a HUD Library function.

Description

Sets virtual screen size to default (640×480). Shorthand for HudSetVirtualSize(640.0, 480.0).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 16:56:59 +0000</pubDate>
        </item>
        <item>
            <title>IdentifySourcePort</title>
            <link>https://acsutils.strangled.net/functions:identifysourceport?rev=1489922343&amp;do=diff</link>
            <description>IdentifySourcePort

info needs_examples

int IdentifySourcePort()

Description

Identifies the port the mod is being played in.

Returns one of the following constants:

	*  PORT_ZDOOM
	*  PORT_GZDOOM
	*  PORT_ZANDRONUM

Inner workings

The function performs the following checks:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 19 Mar 2017 11:19:03 +0000</pubDate>
        </item>
        <item>
            <title>iln</title>
            <link>https://acsutils.strangled.net/functions:iln?rev=1492450735&amp;do=diff</link>
            <description>iln

math numerical_algorithms logarithms needs_examples

fixed iln(fixed x)

Description

Returns the natural logarithm of x.

For a version with a fixed-point argument, see ln.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:38:55 +0000</pubDate>
        </item>
        <item>
            <title>ilog2</title>
            <link>https://acsutils.strangled.net/functions:ilog2?rev=1492450792&amp;do=diff</link>
            <description>ilog2

math numerical_algorithms logarithms needs_examples

fixed ilog2(fixed x)

Description

Returns the base-2 logarithm of x.

For a version with a fixed-point argument, see log2.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:39:52 +0000</pubDate>
        </item>
        <item>
            <title>ilog10</title>
            <link>https://acsutils.strangled.net/functions:ilog10?rev=1492450850&amp;do=diff</link>
            <description>ilog10

math numerical_algorithms logarithms needs_examples

fixed ilog10(fixed x)

Description

Returns the base-10 logarithm of x.

For a version with a fixed-point argument, see log10.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:40:50 +0000</pubDate>
        </item>
        <item>
            <title>ilogb</title>
            <link>https://acsutils.strangled.net/functions:ilogb?rev=1492451103&amp;do=diff</link>
            <description>ilogb

math numerical_algorithms logarithms needs_examples

fixed ilogb(fixed base, int x)

Description

Returns an arbitrary-base logarithm of x.

For a version with a fixed-point x, see logb.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:45:03 +0000</pubDate>
        </item>
        <item>
            <title>IntDiv</title>
            <link>https://acsutils.strangled.net/functions:intdiv?rev=1492266032&amp;do=diff</link>
            <description>IntDiv

math numerical_algorithms

fixed IntDiv(int a, int b)

Description

Divides two integers and returns a fixed-point result. Allows division of any two integers whose ratio is not higher than 32767.

Can be used as a shorthand for FixedDiv(a&lt;&lt;16, b&lt;&lt;16).

For a safe version see</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:20:32 +0000</pubDate>
        </item>
        <item>
            <title>ipow</title>
            <link>https://acsutils.strangled.net/functions:ipow?rev=1492266067&amp;do=diff</link>
            <description>ipow

math

int ipow(int x, int power)

Description

Returns x raised to the integer power. Only positive powers are supported.

For a version with fixed-number base (e.g. 0.5^y), see fpow.

Examples


ipow(2, 3) -&gt; 8
ipow(2, 1) -&gt; 2
ipos(2, 0) -&gt; 1</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:21:07 +0000</pubDate>
        </item>
        <item>
            <title>isalnum</title>
            <link>https://acsutils.strangled.net/functions:isalnum?rev=1492428064&amp;do=diff</link>
            <description>isalnum

character needs_examples

bool isalnum(int c)

Description

Returns true if the character is a letter or a digit. Equivalent to the corresponding C function isalnum.

See also

StrIsAlNum</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:21:04 +0000</pubDate>
        </item>
        <item>
            <title>isalpha</title>
            <link>https://acsutils.strangled.net/functions:isalpha?rev=1492428031&amp;do=diff</link>
            <description>isalpha

character needs_examples

bool isalpha(int c)

Description

Returns true if the character is a letter of the alphabet. Equivalent to the corresponding C function isalpha.

See also

StrIsAlpha</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:20:31 +0000</pubDate>
        </item>
        <item>
            <title>isascii</title>
            <link>https://acsutils.strangled.net/functions:isascii?rev=1492429260&amp;do=diff</link>
            <description>isascii

character

bool isascii(str s)

Description

Returns true if the character is an ASCII character.

To check that the whole string only uses ASCII characters, use StrIsASCII.

Examples


isascii(&#039;c&#039;) -&gt; true
isascii(&#039;ç&#039;) -&gt; false</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:41:00 +0000</pubDate>
        </item>
        <item>
            <title>isblank</title>
            <link>https://acsutils.strangled.net/functions:isblank?rev=1492428298&amp;do=diff</link>
            <description>isblank

character needs_examples

bool isblank(int c)

Description

Returns true if the character is blank. Equivalent to the corresponding C function isblank.

See also

StrIsBlank</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:24:58 +0000</pubDate>
        </item>
        <item>
            <title>iscntrl</title>
            <link>https://acsutils.strangled.net/functions:iscntrl?rev=1492428340&amp;do=diff</link>
            <description>iscntrl

character needs_examples

bool iscntrl(int c)

Description

Returns true if the character is a control character. Equivalent to the corresponding C function iscntrl.

See also

StrIsCntrl</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:25:40 +0000</pubDate>
        </item>
        <item>
            <title>IsColorCodeChar</title>
            <link>https://acsutils.strangled.net/functions:iscolorcodechar?rev=1492266368&amp;do=diff</link>
            <description>IsColorCodeChar

string color_codes

bool IsColorCodeChar(int c)

Description

Returns true if c is a valid single-character color code (like \cg but not \c[blue]).

See the list of single-character color codes at ZDoom Wiki
[
Examples


IsColorCodeChar(&#039;g&#039;) -&gt; true
IsColorCodeChar(&#039;a&#039;) -&gt; false</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:26:08 +0000</pubDate>
        </item>
        <item>
            <title>isdigit</title>
            <link>https://acsutils.strangled.net/functions:isdigit?rev=1492428374&amp;do=diff</link>
            <description>isdigit

character needs_examples

bool isdigit(int c)

Description

Returns true if the character is a digit. Equivalent to the corresponding C function isdigit.

See also

StrIsDigit</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:26:14 +0000</pubDate>
        </item>
        <item>
            <title>isgraph</title>
            <link>https://acsutils.strangled.net/functions:isgraph?rev=1492428420&amp;do=diff</link>
            <description>isgraph

character needs_examples

bool isgraph(int c)

Description

Returns true if the character has a graphical representation. Equivalent to the corresponding C function isgraph.

See also

StrIsGraph</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:27:00 +0000</pubDate>
        </item>
        <item>
            <title>islower</title>
            <link>https://acsutils.strangled.net/functions:islower?rev=1492428465&amp;do=diff</link>
            <description>islower

character needs_examples

bool islower(int c)

Description

Returns true if the character is a lowercase letter. Equivalent to the corresponding C function islower.

See also

StrIsLower</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:27:45 +0000</pubDate>
        </item>
        <item>
            <title>isprint</title>
            <link>https://acsutils.strangled.net/functions:isprint?rev=1492428513&amp;do=diff</link>
            <description>isprint

character needs_examples

bool isprint(int c)

Description

Returns true if the character is printable. Equivalent to the corresponding C function isprint.

See also

StrIsPrint</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:28:33 +0000</pubDate>
        </item>
        <item>
            <title>ispunct</title>
            <link>https://acsutils.strangled.net/functions:ispunct?rev=1492428565&amp;do=diff</link>
            <description>ispunct

character needs_examples

bool ispunct(int c)

Description

Returns true if the character is a punctuation character. Equivalent to the corresponding C function ispunct.

See also

StrIsPunct</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:29:25 +0000</pubDate>
        </item>
        <item>
            <title>isspace</title>
            <link>https://acsutils.strangled.net/functions:isspace?rev=1492428603&amp;do=diff</link>
            <description>isspace

character needs_examples

bool isspace(int c)

Description

Returns true if the character is whitespace. Equivalent to the corresponding C function isspace.

See also

StrIsSpace</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:30:03 +0000</pubDate>
        </item>
        <item>
            <title>isupper</title>
            <link>https://acsutils.strangled.net/functions:isupper?rev=1492428667&amp;do=diff</link>
            <description>isupper

character needs_examples

bool isupper(int c)

Description

Returns true if the character is an uppercase letter. Equivalent to the corresponding C function isupper.

See also

StrIsUpper</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:31:07 +0000</pubDate>
        </item>
        <item>
            <title>isxdigit</title>
            <link>https://acsutils.strangled.net/functions:isxdigit?rev=1492428724&amp;do=diff</link>
            <description>isxdigit

character needs_examples

bool isxdigit(int c)

Description

Returns true if the character is a hexadecimal digit. Equivalent to the corresponding C function isxdigit.

See also

StrIsXDigit</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:32:04 +0000</pubDate>
        </item>
        <item>
            <title>jumpz2height</title>
            <link>https://acsutils.strangled.net/functions:jumpz2height?rev=1499611295&amp;do=diff</link>
            <description>jumpz2height

units zdoom

fixed jumpz2height(fixed height, fixed gravity)

Description

Converts JumpZ to jump height, assuming specified gravity. 

Gravity is specified as acceleration, not as sv_gravity units.
1.0GetGravityG
Conversion formula

jumpz = sqrt(2 * height * gravity)

Examples


int height = jumpz2height(8.0, 1.0);
print(s:&quot;JumpZ of 8 will let you jump &quot;, f:height, s:&quot; mapunits high in normal gravity&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:41:35 +0000</pubDate>
        </item>
        <item>
            <title>KeyBound</title>
            <link>https://acsutils.strangled.net/functions:keybound?rev=1497356215&amp;do=diff</link>
            <description>KeyBound

zdoom input

bool KeyBound(str alias)

Description

Returns true if the key is bound to the specified alias.

Works by reading StrParam(k:alias) and comparing it to “??? (alias)”

Examples


if (!KeyBound(&quot;+attack&quot;))
    print(s:&quot;Please bind an attack key&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:16:55 +0000</pubDate>
        </item>
        <item>
            <title>KeyDown</title>
            <link>https://acsutils.strangled.net/functions:keydown?rev=1492269508&amp;do=diff</link>
            <description>KeyDown

input needs_examples

bool KeyDown(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:18:28 +0000</pubDate>
        </item>
        <item>
            <title>KeyDownAny</title>
            <link>https://acsutils.strangled.net/functions:keydownany?rev=1492269580&amp;do=diff</link>
            <description>KeyDownAny

input needs_examples

bool KeyDownAny(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:19:40 +0000</pubDate>
        </item>
        <item>
            <title>KeyPressed</title>
            <link>https://acsutils.strangled.net/functions:keypressed?rev=1492269524&amp;do=diff</link>
            <description>KeyPressed

input needs_examples

bool KeyPressed(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:18:44 +0000</pubDate>
        </item>
        <item>
            <title>KeyPressedAny</title>
            <link>https://acsutils.strangled.net/functions:keypressedany?rev=1492269594&amp;do=diff</link>
            <description>KeyPressedAny

input needs_examples

bool KeyPressedAny(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:19:54 +0000</pubDate>
        </item>
        <item>
            <title>KeyReleased</title>
            <link>https://acsutils.strangled.net/functions:keyreleased?rev=1492269550&amp;do=diff</link>
            <description>KeyReleased

input needs_examples

bool KeyReleased(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:19:10 +0000</pubDate>
        </item>
        <item>
            <title>KeyReleasedAny</title>
            <link>https://acsutils.strangled.net/functions:keyreleasedany?rev=1492269610&amp;do=diff</link>
            <description>KeyReleasedAny

input needs_examples

bool KeyReleasedAny(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:20:10 +0000</pubDate>
        </item>
        <item>
            <title>KeyToggled</title>
            <link>https://acsutils.strangled.net/functions:keytoggled?rev=1497356369&amp;do=diff</link>
            <description>KeyToggled

input needs_examples

bool KeyToggled(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:19:29 +0000</pubDate>
        </item>
        <item>
            <title>KeyToggledAny</title>
            <link>https://acsutils.strangled.net/functions:keytoggledany?rev=1497356403&amp;do=diff</link>
            <description>KeyToggledAny

input needs_examples

bool KeyToggledAny(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:20:03 +0000</pubDate>
        </item>
        <item>
            <title>KeyUp</title>
            <link>https://acsutils.strangled.net/functions:keyup?rev=1492269376&amp;do=diff</link>
            <description>KeyUp

input needs_examples

bool KeyUp(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:16:16 +0000</pubDate>
        </item>
        <item>
            <title>KeyUpAny</title>
            <link>https://acsutils.strangled.net/functions:keyupany?rev=1492269567&amp;do=diff</link>
            <description>KeyUpAny

input needs_examples

bool KeyUpAny(int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:19:27 +0000</pubDate>
        </item>
        <item>
            <title>length2d</title>
            <link>https://acsutils.strangled.net/functions:length2d?rev=1489767219&amp;do=diff</link>
            <description>length2d

math vectors zandronum implemented_in_zdoom

fixed length2d(fixed x, fixed y)

Description

Returns the length of the given 2D vector.

This is a Zandronum replacement for VectorLength.

Example

Egyptian triangle:


length2d(3.0, 4.0) -&gt; 5.0


Show XY distance between actors:


int x = GetActorX(tid2) - GetActorX(tid1);
int y = GetActorY(tid2) - GetActorY(tid1);
int distance = length2d(x, y),
print(s:&quot;The two actors are &quot;, f:distance, s:&quot; mapunits apart on the automap&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 16:13:39 +0000</pubDate>
        </item>
        <item>
            <title>length2d2</title>
            <link>https://acsutils.strangled.net/functions:length2d2?rev=1489606526&amp;do=diff</link>
            <description>length2d2

math vectors needs_examples

fixed length2d2(fixed x, fixed y)

Description

Returns the squared length of the given 2D vector.

This is faster than squaring the result of length2d.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:35:26 +0000</pubDate>
        </item>
        <item>
            <title>lerp</title>
            <link>https://acsutils.strangled.net/functions:lerp?rev=1489589477&amp;do=diff</link>
            <description>lerp

math needs_examples

fixed lerp(fixed a, fixed b, fixed alpha)

Description

Performs linear interpolation (or extrapolation) between two numbers and returns the result.

Examples


lerp(A, B, 0.0) -&gt; A
lerp(A, B, 1.0) -&gt; B
lerp(A, B, 0.5) -&gt; (A + B) / 2 // Average of a and b.


Simple animation of movement between two points:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 14:51:17 +0000</pubDate>
        </item>
        <item>
            <title>ln</title>
            <link>https://acsutils.strangled.net/functions:ln?rev=1492450720&amp;do=diff</link>
            <description>ln

math numerical_algorithms logarithms needs_examples

fixed ln(fixed x)

Description

Returns the natural logarithm of x.

For a version with integer argument, see iln.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:38:40 +0000</pubDate>
        </item>
        <item>
            <title>log2</title>
            <link>https://acsutils.strangled.net/functions:log2?rev=1492450806&amp;do=diff</link>
            <description>log2

math numerical_algorithms logarithms needs_examples

fixed log2(fixed x)

Description

Returns the base-2 logarithm of x.

For a version with integer argument, see ilog2.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:40:06 +0000</pubDate>
        </item>
        <item>
            <title>log10</title>
            <link>https://acsutils.strangled.net/functions:log10?rev=1492450820&amp;do=diff</link>
            <description>log10

math numerical_algorithms logarithms needs_examples

fixed log10(fixed x)

Description

Returns the base-10 logarithm of x.

For a version with integer argument, see ilog10.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:40:20 +0000</pubDate>
        </item>
        <item>
            <title>logb</title>
            <link>https://acsutils.strangled.net/functions:logb?rev=1492451020&amp;do=diff</link>
            <description>logb

math numerical_algorithms logarithms needs_examples

fixed logb(fixed base, fixed x)

Description

Returns an arbitrary-base logarithm of x.

For a version with integer x, see ilogb.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:43:40 +0000</pubDate>
        </item>
        <item>
            <title>max</title>
            <link>https://acsutils.strangled.net/functions:max?rev=1566771545&amp;do=diff</link>
            <description>max

math

num max(num a, num b)

Description

Returns the greater of two numbers.

Examples


max(3, 5) -&gt; 5
max(5, 3) -&gt; 5
max(8.0, 7.5) -&gt; 8.0</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 25 Aug 2019 22:19:05 +0000</pubDate>
        </item>
        <item>
            <title>middle</title>
            <link>https://acsutils.strangled.net/functions:middle?rev=1489848195&amp;do=diff</link>
            <description>middle

math

num middle(num a, num b, num c)

num - any numeric type (int or fixed)

Description

Out of three numbers, returns the one that is between the other two.

The order of the arguments doesn&#039;t matter.

Examples


middle(1, 2, 3) -&gt; 2
middle(2, 1, 3) -&gt; 2
middle(3, 1, 2) -&gt; 2

middle(0.1, 0.2, 0.3) -&gt; 0.2
middle(0.1, 0.3, 0.2) -&gt; 0.2
middle(0.2, 0.3, 0.1) -&gt; 0.2</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 18 Mar 2017 14:43:15 +0000</pubDate>
        </item>
        <item>
            <title>min</title>
            <link>https://acsutils.strangled.net/functions:min?rev=1489566220&amp;do=diff</link>
            <description>min

math

num min(num a, num b)

num - any numeric type (int or fixed)

Description

Returns the lesser of two numbers.

Examples


min(3, 5) -&gt; 3
min(5, 3) -&gt; 3
min(8.0, 7.5) -&gt; 7.5</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 08:23:40 +0000</pubDate>
        </item>
        <item>
            <title>mod</title>
            <link>https://acsutils.strangled.net/functions:mod?rev=1500120801&amp;do=diff</link>
            <description>mod

math

num mod(num a, num b)

num - any numeric type (int or fixed)

Description

This function implements modulo division a % b, but, unlike the ACS operator, it handles negative values of a like mathematical modulo, making a cycle around on the range [0, b).

This makes its result safe to use an array index, as the result is not negative for negative values of</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Jul 2017 12:13:21 +0000</pubDate>
        </item>
        <item>
            <title>NewTid</title>
            <link>https://acsutils.strangled.net/functions:newtid?rev=1492266554&amp;do=diff</link>
            <description>NewTid

zdoom zandronum

int NewTid()

Description

The problem

UniqueTid is error-prone when mixed with statically allocated tid ranges. You always need to pass the correct boundaries to UniqueTid, like UniqueTid(2000, INT_MAX), making sure that no actors with tid over 2000 are spawned manually after a call to UniqueTid. Otherwise the newly spawned actor may conflict with the randomly allocated tid.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:29:14 +0000</pubDate>
        </item>
        <item>
            <title>normalize2d</title>
            <link>https://acsutils.strangled.net/functions:normalize2d?rev=1489772606&amp;do=diff</link>
            <description>normalize2d

math vectors needs_examples

fixed, fixed normalize2d(fixed x, fixed y)

This function returns multiple values.

Description

Normalizes a 2D vector and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 17:43:26 +0000</pubDate>
        </item>
        <item>
            <title>normalize3d</title>
            <link>https://acsutils.strangled.net/functions:normalize3d?rev=1489772627&amp;do=diff</link>
            <description>normalize3d

math vectors needs_examples

fixed, fixed, fixed normalize3d(fixed x, fixed y, fixed z)

This function returns multiple values.

Description

Normalizes a 3D vector and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 17:43:47 +0000</pubDate>
        </item>
        <item>
            <title>notflag</title>
            <link>https://acsutils.strangled.net/functions:notflag?rev=1500125632&amp;do=diff</link>
            <description>notflag

math bitfield

bool notflag(int allflags, int flag)

Description

Returns true if the given flag is not set in allflags. Shorthand for !(allflags &amp; flag).

Examples


if (notflag(flags, FLAG_NOSOMETHING))
{
    DoSomething();
    ...
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Jul 2017 13:33:52 +0000</pubDate>
        </item>
        <item>
            <title>npo2</title>
            <link>https://acsutils.strangled.net/functions:npo2?rev=1492266633&amp;do=diff</link>
            <description>npo2

math numerical_algorithms

num npo2(num x)

num - any numeric type (int or fixed)

Description

Returns x rounded up to the the Next Power Of 2. The input must be positive.

If x is a power of 2, x is unchanged.

Examples


npo2(16) -&gt; 16
npo2(17) -&gt; 32
npo2(6.5) -&gt; 8.0
npo2(8.0) -&gt; 8.0</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:30:33 +0000</pubDate>
        </item>
        <item>
            <title>PackBytes</title>
            <link>https://acsutils.strangled.net/functions:packbytes?rev=1492451262&amp;do=diff</link>
            <description>PackBytes

packing

int PackBytes(int byte1, int byte2, int byte3, int byte4)

Description

Packs four bytes into one integer and returns the result. The bytes must be in the [0, 255] range.

The packed values can be retrieved using UnpackByteX.

PackShorts



Examples


int packed = PackBytes(10, 11, 12, 13);
UnpackByte1(packed) -&gt; 10
UnpackByte2(packed) -&gt; 11
UnpackByte3(packed) -&gt; 12
UnpackByte4(packed) -&gt; 13</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:47:42 +0000</pubDate>
        </item>
        <item>
            <title>PackShorts</title>
            <link>https://acsutils.strangled.net/functions:packshorts?rev=1492451290&amp;do=diff</link>
            <description>PackShorts

packing

int PackShorts(int short1, int short2)

Description

Packs two short integers (-32768 to 32767) into one integer and returns the result.

The packed values can be retrieved using UnpackShortX.

PackBytes



Examples


int packed = PackShorts(12345, -15000);
UnpackShort1(packed) -&gt; 12345
UnpackShort2(packed) -&gt; -15000</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:48:10 +0000</pubDate>
        </item>
        <item>
            <title>ParseFixed</title>
            <link>https://acsutils.strangled.net/functions:parsefixed?rev=1490121045&amp;do=diff</link>
            <description>ParseFixed

number_parsing

int, fixed ParseFixed(str s, int base)

This function returns multiple values

Description

Parses s as a real number in the specified base and returns status and result. If base is 0, base 10 is used by default and prefixes like 0x are allowed.

See Number parsing for features and examples.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 21 Mar 2017 18:30:45 +0000</pubDate>
        </item>
        <item>
            <title>ParseInt</title>
            <link>https://acsutils.strangled.net/functions:parseint?rev=1492432683&amp;do=diff</link>
            <description>ParseInt

number_parsing

int, int ParseInt(str s, int base)

This function returns multiple values

Description

Parses s as an integer in the specified base. If base is 0, base 10 is used by default and Number prefixes are enabled. Supports signs.

Returns status and parsed number. Status is one of the following:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 12:38:03 +0000</pubDate>
        </item>
        <item>
            <title>PickRandomBot</title>
            <link>https://acsutils.strangled.net/functions:pickrandombot?rev=1497361204&amp;do=diff</link>
            <description>PickRandomBot

player needs_examples

int PickRandomBot()

Description

Returns the number of a random player that is a bot.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:40:04 +0000</pubDate>
        </item>
        <item>
            <title>PickRandomClient</title>
            <link>https://acsutils.strangled.net/functions:pickrandomclient?rev=1497361291&amp;do=diff</link>
            <description>PickRandomClient

player needs_examples

int PickRandomClient()

Description

Returns the number of a random connected client (either spectating or in game, includes bots).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:41:31 +0000</pubDate>
        </item>
        <item>
            <title>PickRandomDeadSpectator</title>
            <link>https://acsutils.strangled.net/functions:pickrandomdeadspectator?rev=1497361316&amp;do=diff</link>
            <description>PickRandomDeadSpectator

player needs_examples

int PickRandomDeadSpectator()

Description

Returns the number of a random player that is dead spectating.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:41:56 +0000</pubDate>
        </item>
        <item>
            <title>PickRandomPlayer</title>
            <link>https://acsutils.strangled.net/functions:pickrandomplayer?rev=1497361111&amp;do=diff</link>
            <description>PickRandomPlayer

player

int PickRandomPlayer()

Description

Returns the number of a random player that is in game.

This function was made because many mods implement random player choice incorrectly, resulting in the same player getting chosen over and over again.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:38:31 +0000</pubDate>
        </item>
        <item>
            <title>PickRandomSpectator</title>
            <link>https://acsutils.strangled.net/functions:pickrandomspectator?rev=1497361173&amp;do=diff</link>
            <description>PickRandomSpectator

player needs_examples

int PickRandomSpectator()

Description

Returns the number of a random player that is spectating.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:39:33 +0000</pubDate>
        </item>
        <item>
            <title>PickRandomTeamPlayer</title>
            <link>https://acsutils.strangled.net/functions:pickrandomteamplayer?rev=1497361548&amp;do=diff</link>
            <description>PickRandomTeamPlayer

player needs_examples

int PickRandomTeamPlayer(int team)

Description

Returns the number of a random player that isn&#039;t spectating and belongs to the team.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:45:48 +0000</pubDate>
        </item>
        <item>
            <title>PlayerIsConnected</title>
            <link>https://acsutils.strangled.net/functions:playerisconnected?rev=1489783974&amp;do=diff</link>
            <description>PlayerIsConnected

player needs_examples

bool PlayerIsConnected(int player)

Description

Returns true if the specified player is connected to the server.

It works by calling PlayerInGame and PlayerIsSpectator. If both return false, the player is not connected.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 20:52:54 +0000</pubDate>
        </item>
        <item>
            <title>PlayerIsDeadSpectator</title>
            <link>https://acsutils.strangled.net/functions:playerisdeadspectator?rev=1497361371&amp;do=diff</link>
            <description>PlayerIsDeadSpectator

player needs_examples

int PlayerIsDeadSpectator()

Description

Returns true if the player is a dead spectator. Shorthand for PlayerIsSpectator(player) == 2.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:42:51 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyDown</title>
            <link>https://acsutils.strangled.net/functions:playerkeydown?rev=1492269659&amp;do=diff</link>
            <description>PlayerKeyDown

input needs_examples

bool PlayerKeyDown(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:20:59 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyDownAny</title>
            <link>https://acsutils.strangled.net/functions:playerkeydownany?rev=1492269721&amp;do=diff</link>
            <description>PlayerKeyDownAny

input needs_examples

bool PlayerKeyDownAny(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:22:01 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyPressed</title>
            <link>https://acsutils.strangled.net/functions:playerkeypressed?rev=1492269674&amp;do=diff</link>
            <description>PlayerKeyPressed

input needs_examples

bool PlayerKeyPressed(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:21:14 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyPressedAny</title>
            <link>https://acsutils.strangled.net/functions:playerkeypressedany?rev=1492269740&amp;do=diff</link>
            <description>PlayerKeyPressedAny

input needs_examples

bool PlayerKeyPressedAny(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:22:20 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyReleased</title>
            <link>https://acsutils.strangled.net/functions:playerkeyreleased?rev=1492269686&amp;do=diff</link>
            <description>PlayerKeyReleased

input needs_examples

bool PlayerKeyReleased(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:21:26 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyReleasedAny</title>
            <link>https://acsutils.strangled.net/functions:playerkeyreleasedany?rev=1492269759&amp;do=diff</link>
            <description>PlayerKeyReleasedAny

input needs_examples

bool PlayerKeyReleasedAny(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:22:39 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyToggled</title>
            <link>https://acsutils.strangled.net/functions:playerkeytoggled?rev=1497356435&amp;do=diff</link>
            <description>PlayerKeyToggled

input needs_examples

bool PlayerKeyToggled(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:20:35 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyToggledAny</title>
            <link>https://acsutils.strangled.net/functions:playerkeytoggledany?rev=1497356458&amp;do=diff</link>
            <description>PlayerKeyToggledAny

input needs_examples

bool PlayerKeyToggledAny(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:20:58 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyUp</title>
            <link>https://acsutils.strangled.net/functions:playerkeyup?rev=1492269648&amp;do=diff</link>
            <description>PlayerKeyUp

input needs_examples

bool PlayerKeyUp(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:20:48 +0000</pubDate>
        </item>
        <item>
            <title>PlayerKeyUpAny</title>
            <link>https://acsutils.strangled.net/functions:playerkeyupany?rev=1492269709&amp;do=diff</link>
            <description>PlayerKeyUpAny

input needs_examples

bool PlayerKeyUpAny(int player, int key)

Description

See Input functions.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:21:49 +0000</pubDate>
        </item>
        <item>
            <title>PlayerName</title>
            <link>https://acsutils.strangled.net/functions:playername?rev=1492267249&amp;do=diff</link>
            <description>PlayerName

string player needs_examples

str PlayerName(int player)

Description

Returns the name of the specified player. Shorthand for StrParam(n:1+player).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:40:49 +0000</pubDate>
        </item>
        <item>
            <title>rad2ang</title>
            <link>https://acsutils.strangled.net/functions:rad2ang?rev=1492429517&amp;do=diff</link>
            <description>rad2ang

math units needs_examples

angle rad2ang(fixed radians)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Converts radians to a ZDoom angle and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:45:17 +0000</pubDate>
        </item>
        <item>
            <title>rad2deg</title>
            <link>https://acsutils.strangled.net/functions:rad2deg?rev=1492429686&amp;do=diff</link>
            <description>rad2deg

math units needs_examples

fixed rad2deg(fixed radians)

Description

Converts radians to degrees and returns the result.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:48:06 +0000</pubDate>
        </item>
        <item>
            <title>randbool</title>
            <link>https://acsutils.strangled.net/functions:randbool?rev=1497362556&amp;do=diff</link>
            <description>randbool

math

bool randbool()

Description

Returns a random boolean value (true or false). Shorthand for random(0, 1).

Examples


if (randbool())
    a;
else
    b;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 14:02:36 +0000</pubDate>
        </item>
        <item>
            <title>RandomPick</title>
            <link>https://acsutils.strangled.net/functions:randompick?rev=1500047556&amp;do=diff</link>
            <description>RandomPick

random needs_examples

any RandomPickN(any n1, any n2, ...)

any - any type (int, fixed or str)

Description

Randomly picks one of the arguments and returns its value. Designed to mimic decorate&#039;s RandomPick function.

As none of the compilers support functions with variable argument counts, RandomPick2</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 14 Jul 2017 15:52:36 +0000</pubDate>
        </item>
        <item>
            <title>randsign</title>
            <link>https://acsutils.strangled.net/functions:randsign?rev=1499611401&amp;do=diff</link>
            <description>randsign

math random

int randsign()

Description

Returns a random sign (-1 or 1). Shorthand for 2 * Random(0, 1) - 1.

Examples


int speed = randsign() * 10.0;
// speed is now either 10.0 or -10.0.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:43:21 +0000</pubDate>
        </item>
        <item>
            <title>RotatePoint</title>
            <link>https://acsutils.strangled.net/functions:rotatepoint?rev=1492267312&amp;do=diff</link>
            <description>RotatePoint

math vectors needs_examples

fixed, fixed RotatePoint(fixed x, fixed y, fixed originX, fixed originY, angle angle)

angle - a fixed-point ZDoom angle (not degrees or radians)

This function returns multiple values.

Description

Returns the 2D point rotated around the origin by angle.

Examples


RotatePoint(x, y, originX, originY, angle);
int newX = r1;
int newY = r2;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:41:52 +0000</pubDate>
        </item>
        <item>
            <title>RotateVector</title>
            <link>https://acsutils.strangled.net/functions:rotatevector?rev=1489766709&amp;do=diff</link>
            <description>RotateVector

math vectors

fixed, fixed RotateVector(fixed x, fixed y, angle angle)

angle - a fixed-point ZDoom angle (not degrees or radians)

This function returns multiple values.

Description

Returns the 2D vector rotated by angle.

Examples


RotateVector(x, y, angle);
int newX = r1;
int newY = r2;


Rotate a point around the origin


RotateVector(x - originX, y - originY, angle);
int newX = r1 + originX;
int newY = r2 + originY;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 16:05:09 +0000</pubDate>
        </item>
        <item>
            <title>SafeDiv</title>
            <link>https://acsutils.strangled.net/functions:safediv?rev=1489765294&amp;do=diff</link>
            <description>SafeDiv

math todo

int SafeDiv(int num, int den)

Description

Performs safe division: if denumerator is 0, the result is 0 and no error happens.

Integer version, for fixed-point numbers see SafeFixedDiv.

Examples


SafeDiv(6, 3) -&gt; 2
SafeDiv(6, 0) -&gt; 0</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 15:41:34 +0000</pubDate>
        </item>
        <item>
            <title>SafeFixedDiv</title>
            <link>https://acsutils.strangled.net/functions:safefixeddiv?rev=1489765285&amp;do=diff</link>
            <description>SafeFixedDiv

math todo

fixed SafeFixedDiv(fixed num, fixed den)

Description

Performs safe division: if denumerator is 0, the result is 0 and no error happens.

Fixed-point version, for integers see SafeDiv.

Examples


SafeFixedDiv(6.0, 3.0) -&gt; 2.0
SafeFixedDiv(6.0, 0.0) -&gt; 0
SafeFixedDiv(6.0, 5.0) -&gt; 1.2</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 15:41:25 +0000</pubDate>
        </item>
        <item>
            <title>sec</title>
            <link>https://acsutils.strangled.net/functions:sec?rev=1489605098&amp;do=diff</link>
            <description>sec

math trigonometry needs_examples

fixed sec(angle x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the secant of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 19:11:38 +0000</pubDate>
        </item>
        <item>
            <title>SetActivatorToConsolePlayer</title>
            <link>https://acsutils.strangled.net/functions:setactivatortoconsoleplayer?rev=1497357500&amp;do=diff</link>
            <description>SetActivatorToConsolePlayer

player needs_examples

void SetActivatorToConsolePlayer()

Description

Sets the activator to ConsolePlayer. Shorthand for SetActivatorToPlayer2(ConsolePlayerNumber()).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:38:20 +0000</pubDate>
        </item>
        <item>
            <title>SetActivatorToPlayer2</title>
            <link>https://acsutils.strangled.net/functions:setactivatortoplayer2?rev=1497357433&amp;do=diff</link>
            <description>SetActivatorToPlayer2

player zdoom needs_examples

bool SetActivatorToPlayer2(int player)

Description

Zandronum provides SetActivatorToPlayer, while ZDoom only provides AAPTR_PLAYERx constants for SetActivator, which support 8 players max.

This function first attempts to use SetActivatorToPlayer, then, if it fails (for example, due to the mod running in ZDoom), it attemps to use</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 12:37:13 +0000</pubDate>
        </item>
        <item>
            <title>SetActorInventory</title>
            <link>https://acsutils.strangled.net/functions:setactorinventory?rev=1497362311&amp;do=diff</link>
            <description>SetActorInventory

zdoom needs_examples

void SetActorInventory(int tid, str item, int amount)

Description

A version of SetInventory that works on an arbitrary actor.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:58:31 +0000</pubDate>
        </item>
        <item>
            <title>SetCursorArea</title>
            <link>https://acsutils.strangled.net/functions:setcursorarea?rev=1497529205&amp;do=diff</link>
            <description>SetCursorArea

cursor

void SetCursorArea(fixed width, fixed height)

Description

Sets the size of the cursor coordinate system. The coordinate system used by the cursor matches the HUD coordinate system.

Cursor position is fully fixed-point, even SetCursorArea(1.0, 1.0) will work correctly.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 15 Jun 2017 12:20:05 +0000</pubDate>
        </item>
        <item>
            <title>SetCursorPosition</title>
            <link>https://acsutils.strangled.net/functions:setcursorposition?rev=1492272227&amp;do=diff</link>
            <description>SetCursorPosition

cursor

void SetCursorPosition(fixed x, fixed y)

Description

Sets the position of the Cursor.

See also

CenterCursor</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 16:03:47 +0000</pubDate>
        </item>
        <item>
            <title>SetGravityG</title>
            <link>https://acsutils.strangled.net/functions:setgravityg?rev=1499610974&amp;do=diff</link>
            <description>SetGravityG

zdoom units needs_examples

void SetGravityG(fixed gravity)

Description

A version of SetGravity that accepts acceleration as argument, instead of sv_gravity units.
1.0GetGravityGSetGravity</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:36:14 +0000</pubDate>
        </item>
        <item>
            <title>SetInventory</title>
            <link>https://acsutils.strangled.net/functions:setinventory?rev=1497362267&amp;do=diff</link>
            <description>SetInventory

zdoom

void SetInventory(str item, int amount)

Description

Sets the amount of items of the given type in the activator&#039;s inventory to amount.

This function is optimized for networking and won&#039;t call TakeInventory or GiveInventory if the actor already has the exact amount of items.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:57:47 +0000</pubDate>
        </item>
        <item>
            <title>sgn</title>
            <link>https://acsutils.strangled.net/functions:sgn?rev=1489567160&amp;do=diff</link>
            <description>sgn

math

int sgn(num x)

num - any numeric type (int or fixed)

Description

Returns the sign of x as an integer.

	*  1 -- x is positive
	*  0 -- x is zero
	*  -1 -- x is negative

Examples


sgn(    7) -&gt; 1
sgn(   -7) -&gt; -1
sgn( 12.3) -&gt; 1
sgn(-12.3) -&gt; -1
sgn(    0) -&gt; 0</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 08:39:20 +0000</pubDate>
        </item>
        <item>
            <title>SkipColorCodeAt</title>
            <link>https://acsutils.strangled.net/functions:skipcolorcodeat?rev=1499611632&amp;do=diff</link>
            <description>SkipColorCodeAt

string colorcode

int SkipColorCodeAt(str s, int i)

Description

Skips one colorcode at position i and returns the first index after the skipped colorcode. If there is no colorcode at i, returns i.

Examples

This is how StripColorCodes is implemented:


function str StripColorCodes(str s)
{
	str result = &quot;&quot;;
	for (int i = 0; i &lt; StrLen(s); i++)
	{
		i = SkipColorCodeAt(s, i);
		result = StrParam(s:result, c:GetChar(s, i));
	}

	return result;
}</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:47:12 +0000</pubDate>
        </item>
        <item>
            <title>SpectatorCount</title>
            <link>https://acsutils.strangled.net/functions:spectatorcount?rev=1489784312&amp;do=diff</link>
            <description>SpectatorCount

player needs_examples

int SpectatorCount()

Description

Returns the amount of spectators present on the server.

It works by looping through all players and counting for how many of them PlayerIsSpectator returns true.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 20:58:32 +0000</pubDate>
        </item>
        <item>
            <title>StatusBarVisible</title>
            <link>https://acsutils.strangled.net/functions:statusbarvisible?rev=1497289380&amp;do=diff</link>
            <description>StatusBarVisible

hud needs_examples

bool StatusBarVisible()

Description

Returns true if the status bar is visible by the client.

Works by reading the screenblocks cvar.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 12 Jun 2017 17:43:00 +0000</pubDate>
        </item>
        <item>
            <title>StrAdd</title>
            <link>https://acsutils.strangled.net/functions:stradd?rev=1489783246&amp;do=diff</link>
            <description>StrAdd

string

str StrAdd(str a, str b)

Description

Returns two strings concatenated. Shorthand for StrParam(s:a, s:b).

Examples


str a = &quot;hello, &quot;;
str b = &quot;world!&quot;;
StrAdd(a, b) -&gt; &quot;hello, world!&quot;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Mar 2017 20:40:46 +0000</pubDate>
        </item>
        <item>
            <title>StrCapitalize</title>
            <link>https://acsutils.strangled.net/functions:strcapitalize?rev=1492271806&amp;do=diff</link>
            <description>StrCapitalize

string

str StrCapitalize(str s)

Description

Returns s with the first character uppercase and the rest lowercase.

To capitalize each word, use StrCapitalizeWords.

Examples


StrCapitalize(&quot;hello world&quot;) -&gt; &quot;Hello&quot;
StrCapitalize(&quot;HELLO WORLD&quot;) -&gt; &quot;Hello world&quot;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 15:56:46 +0000</pubDate>
        </item>
        <item>
            <title>StrEquals</title>
            <link>https://acsutils.strangled.net/functions:strequals?rev=1497360902&amp;do=diff</link>
            <description>StrEquals

string

bool StrEquals(str a, str b)

Description

Returns true if two strings are equal. Case-sensitive. For case-insensitive version, see StrIEquals. Shorthand for !StrCmp(a, b).

Examples


StrEquals(&quot;abc&quot;, &quot;abc&quot;) -&gt; true
StrEquals(&quot;abc&quot;, &quot;ab&quot;) -&gt; false
StrEquals(&quot;Abc&quot;, &quot;abc&quot;) -&gt; false</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:35:02 +0000</pubDate>
        </item>
        <item>
            <title>StrFind</title>
            <link>https://acsutils.strangled.net/functions:strfind?rev=1608808377&amp;do=diff</link>
            <description>StrFind

string

int StrFind(str s, str what)

Description

Returns the position of the first occurence of what in s. If the string is not present, returns -1.
lastStrRFind
Examples


StrFind(&quot;abcdefabc&quot;, &quot;def&quot;) -&gt; 3
StrFind(&quot;abcdefabc&quot;, &quot;abc&quot;) -&gt; 0 // First occurence
StrFind(&quot;abcdef&quot;, &quot;xyz&quot;) -&gt; -1   // Not found
StrFind(&quot;abcABCabc&quot;, &quot;ABC&quot;) -&gt; 3 // Case-insensitive
StrFind(&quot;ab&quot;, &quot;abc&quot;) -&gt; -1 // Not found
StrFind(&quot;&quot;, &quot;abc&quot;) -&gt; -1 // Not found</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 24 Dec 2020 11:12:57 +0000</pubDate>
        </item>
        <item>
            <title>StrIEquals</title>
            <link>https://acsutils.strangled.net/functions:striequals?rev=1499603607&amp;do=diff</link>
            <description>StrIEquals

string

bool StrIEquals(str a, str b)

Description

Returns true if two strings are equal. Case-insensitive. For case-sensitive version, see StrEquals. Shorthand for !StrICmp(a, b).

Examples


StrIEquals(&quot;abc&quot;, &quot;abc&quot;) -&gt; true
StrIEquals(&quot;abc&quot;, &quot;ab&quot;) -&gt; false
StrIEquals(&quot;Abc&quot;, &quot;abc&quot;) -&gt; true</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 12:33:27 +0000</pubDate>
        </item>
        <item>
            <title>StripColorCodes</title>
            <link>https://acsutils.strangled.net/functions:stripcolorcodes?rev=1499611780&amp;do=diff</link>
            <description>StripColorCodes

string colorcode

str StripColorCodes(str s)

Description

Removes all colorcodes from the string and returns the result.

Examples


StripColorCodes(&quot;\cghello&quot;) -&gt; &quot;hello&quot;
StripColorCodes(&quot;hello\cg\cb\c[red]hello&quot;) -&gt; &quot;hellohello&quot;


Use it to strip colorcodes from player names:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 14:49:40 +0000</pubDate>
        </item>
        <item>
            <title>StrIsAlNum</title>
            <link>https://acsutils.strangled.net/functions:strisalnum?rev=1492428814&amp;do=diff</link>
            <description>StrIsAlNum

string needs_examples

bool StrIsAlNum(str s)

Description

Returns true if isalnum applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:33:34 +0000</pubDate>
        </item>
        <item>
            <title>StrIsAlpha</title>
            <link>https://acsutils.strangled.net/functions:strisalpha?rev=1492428795&amp;do=diff</link>
            <description>StrIsAlpha

string needs_examples

bool StrIsAlpha(str s)

Description

Returns true if isalpha applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:33:15 +0000</pubDate>
        </item>
        <item>
            <title>StrIsASCII</title>
            <link>https://acsutils.strangled.net/functions:strisascii?rev=1492429192&amp;do=diff</link>
            <description>StrIsASCII

string

bool StrIsASCII(str s)

Description

Returns true if all characters in the string are ASCII characters.

Use isascii to check an individual character.

Examples


StrIsASCII(&quot;Francais&quot;) -&gt; true
StrIsASCII(&quot;Français&quot;) -&gt; false</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:39:52 +0000</pubDate>
        </item>
        <item>
            <title>StrIsBlank</title>
            <link>https://acsutils.strangled.net/functions:strisblank?rev=1492428837&amp;do=diff</link>
            <description>StrIsBlank

string needs_examples

bool StrIsBlank(str s)

Description

Returns true if isblank applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:33:57 +0000</pubDate>
        </item>
        <item>
            <title>StrIsCntrl</title>
            <link>https://acsutils.strangled.net/functions:striscntrl?rev=1492428858&amp;do=diff</link>
            <description>StrIsCntrl

string needs_examples

bool StrIsCntrl(str s)

Description

Returns true if iscntrl applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:34:18 +0000</pubDate>
        </item>
        <item>
            <title>StrIsDigit</title>
            <link>https://acsutils.strangled.net/functions:strisdigit?rev=1492428878&amp;do=diff</link>
            <description>StrIsDigit

string needs_examples

bool StrIsDigit(str s)

Description

Returns true if isdigit applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:34:38 +0000</pubDate>
        </item>
        <item>
            <title>StrIsEmpty</title>
            <link>https://acsutils.strangled.net/functions:strisempty?rev=1489949722&amp;do=diff</link>
            <description>StrIsEmpty

string

bool StrIsEmpty(str s)

Description

Returns true if s is an empty string (&quot;&quot;). 

A string that consists of only whitespace (e.g. &quot; &quot;) is not considered empty.
0not
Examples


StrIsEmpty(&quot;&quot;) -&gt; true
StrIsEmpty(&quot; &quot;) -&gt; false
StrIsEmpty(&quot;hello&quot;) -&gt; false</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 19 Mar 2017 18:55:22 +0000</pubDate>
        </item>
        <item>
            <title>StrIsFixed</title>
            <link>https://acsutils.strangled.net/functions:strisfixed?rev=1499612502&amp;do=diff</link>
            <description>StrIsFixed

string parsing needs_examples

bool StrIsFixed(str s)

Description

Returns true if the string can be correctly parsed using atof (overflows count as success).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 15:01:42 +0000</pubDate>
        </item>
        <item>
            <title>StrIsGraph</title>
            <link>https://acsutils.strangled.net/functions:strisgraph?rev=1492428917&amp;do=diff</link>
            <description>StrIsGraph

string needs_examples

bool StrIsGraph(str s)

Description

Returns true if isgraph applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:35:17 +0000</pubDate>
        </item>
        <item>
            <title>StrIsInt</title>
            <link>https://acsutils.strangled.net/functions:strisint?rev=1499612488&amp;do=diff</link>
            <description>StrIsInt

string parsing needs_examples

bool StrIsInt(str s)

Description

Returns true if the string can be correctly parsed using atoi (overflows count as success).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 09 Jul 2017 15:01:28 +0000</pubDate>
        </item>
        <item>
            <title>StrIsLower</title>
            <link>https://acsutils.strangled.net/functions:strislower?rev=1492429001&amp;do=diff</link>
            <description>StrIsLower

string needs_examples

bool StrIsLower(str s)

Description

Returns true if islower applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:36:41 +0000</pubDate>
        </item>
        <item>
            <title>StrIsPrint</title>
            <link>https://acsutils.strangled.net/functions:strisprint?rev=1492429024&amp;do=diff</link>
            <description>StrIsPrint

string needs_examples

bool StrIsPrint(str s)

Description

Returns true if isprint applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:37:04 +0000</pubDate>
        </item>
        <item>
            <title>StrIsPunct</title>
            <link>https://acsutils.strangled.net/functions:strispunct?rev=1492429046&amp;do=diff</link>
            <description>StrIsPunct

string needs_examples

bool StrIsPunct(str s)

Description

Returns true if ispunct applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:37:26 +0000</pubDate>
        </item>
        <item>
            <title>StrIsSpace</title>
            <link>https://acsutils.strangled.net/functions:strisspace?rev=1492429067&amp;do=diff</link>
            <description>StrIsSpace

string needs_examples

bool StrIsSpace(str s)

Description

Returns true if isspace applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:37:47 +0000</pubDate>
        </item>
        <item>
            <title>StrIsUpper</title>
            <link>https://acsutils.strangled.net/functions:strisupper?rev=1492429089&amp;do=diff</link>
            <description>StrIsUpper

string needs_examples

bool StrIsUpper(str s)

Description

Returns true if isupper applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:38:09 +0000</pubDate>
        </item>
        <item>
            <title>StrIsXDigit</title>
            <link>https://acsutils.strangled.net/functions:strisxdigit?rev=1492429105&amp;do=diff</link>
            <description>StrIsXDigit

string needs_examples

bool StrIsXDigit(str s)

Description

Returns true if isxdigit applies to all characters in the string.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:38:25 +0000</pubDate>
        </item>
        <item>
            <title>StrRepeat</title>
            <link>https://acsutils.strangled.net/functions:strrepeat?rev=1497277668&amp;do=diff</link>
            <description>StrRepeat

string todo

str StrRepeat(str s, int n)

Description

Returns the string repeated n times. If n is 0, returns empty string.

Examples


StrRepeat(&quot;abc&quot;, 3) -&gt; &quot;abcabcabc&quot;
StrRepeat(&quot;abc&quot;, 0) -&gt; &quot;&quot;
StrRepeat(&quot;abc&quot;, 1) -&gt; &quot;abc&quot;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 12 Jun 2017 14:27:48 +0000</pubDate>
        </item>
        <item>
            <title>StrSplit</title>
            <link>https://acsutils.strangled.net/functions:strsplit?rev=1492427467&amp;do=diff</link>
            <description>StrSplit

string

str, str StrSplit(str s, str separator)

This function returns multiple values.

Description

Finds the first instance of separator and returns text before and after the separator. If the separator is not found, returns (s, &quot;&quot;).

Examples


StrSplit(&quot;abcdefghi&quot;, &quot;def&quot;);
r1 -&gt; &quot;abc&quot;
r2 -&gt; &quot;ghi&quot;

StrSplit(&quot;defghi&quot;, &quot;def&quot;); // Nothing before separtor
r1 -&gt; &quot;&quot;;
r2 -&gt; &quot;ghi&quot;;

StrSplit(&quot;abcdef&quot;, &quot;def&quot;); // Nothing after separator
r1 -&gt; &quot;abc&quot;;
r2 -&gt; &quot;&quot;;

StrSplit(&quot;abc&quot;, &quot;def&quot;); // Not…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 11:11:07 +0000</pubDate>
        </item>
        <item>
            <title>StrToLower</title>
            <link>https://acsutils.strangled.net/functions:strtolower?rev=1492267040&amp;do=diff</link>
            <description>StrToLower

string

str StrToLower(str s)

Description

Returns s with all characters converted to lowercase using tolower.
ASCII
Examples


StrToLower(&quot;Hello There!&quot;) -&gt; &quot;hello there!&quot;


See also

StrToUpper</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:37:20 +0000</pubDate>
        </item>
        <item>
            <title>StrToUpper</title>
            <link>https://acsutils.strangled.net/functions:strtoupper?rev=1492267052&amp;do=diff</link>
            <description>StrToUpper

string

str StrToUpper(str s)

Description

Returns s with all characters converted to uppercase using toupper.
ASCII
Examples


StrToUpper(&quot;Hello There!&quot;) -&gt; &quot;HELLO THERE!&quot;


See also

StrToLower</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:37:32 +0000</pubDate>
        </item>
        <item>
            <title>SyncSpeed</title>
            <link>https://acsutils.strangled.net/functions:syncspeed?rev=1492451397&amp;do=diff</link>
            <description>SyncSpeed

zdoom mapping needs_examples

int SyncSpeed(int newdistance, int syncdistance, int syncspd)

Description

syncspeed</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:49:57 +0000</pubDate>
        </item>
        <item>
            <title>SyncVariable</title>
            <link>https://acsutils.strangled.net/functions:syncvariable?rev=1519074060&amp;do=diff</link>
            <description>SyncVariable

zandronum

void SyncVariable(int tid, num value)

num - any numeric type (int or fixed)

Description

Synchronizes an arbitrary numeric variable from server to all clients using an unused tid. The synchronized value can be read clientside using GetSyncVar and GetSyncVarDefault.

SyncVariable optimizes network traffic to only send packets if the synchronized variable is different.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 19 Feb 2018 21:01:00 +0000</pubDate>
        </item>
        <item>
            <title>tan</title>
            <link>https://acsutils.strangled.net/functions:tan?rev=1489569409&amp;do=diff</link>
            <description>tan

math trigonometry needs_examples

fixed tan(angle x)

angle - a fixed-point ZDoom angle (not degrees or radians)

Description

Returns the tangent of x.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 15 Mar 2017 09:16:49 +0000</pubDate>
        </item>
        <item>
            <title>TeamPlayerCount</title>
            <link>https://acsutils.strangled.net/functions:teamplayercount?rev=1497360725&amp;do=diff</link>
            <description>TeamPlayerCount

player needs_examples

int TeamPlayerCount(int team)

Description

Returns the amount of player belonging to the team. Shorthand for GetTeamProperty(team, TPROP_NumPlayers).</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 13:32:05 +0000</pubDate>
        </item>
        <item>
            <title>tolower</title>
            <link>https://acsutils.strangled.net/functions:tolower?rev=1492267015&amp;do=diff</link>
            <description>tolower

character

int tolower(int c)

Description

Returns the lowercase version of c. If c is not an ASCII letter, it is returned unchanged.

To change the case of a whole string, use StrToLower.

Examples


tolower(&#039;A&#039;) -&gt; &#039;a&#039;
tolower(&#039;a&#039;) -&gt; &#039;a&#039;
tolower(&#039;/&#039;) -&gt; &#039;/&#039; // not a letter
tolower(&#039;Ä&#039;) -&gt; &#039;Ä&#039; // non-ASCII character</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:36:55 +0000</pubDate>
        </item>
        <item>
            <title>toupper</title>
            <link>https://acsutils.strangled.net/functions:toupper?rev=1492266995&amp;do=diff</link>
            <description>toupper

character

int toupper(int c)

Description

Returns the uppercase version of c. If c is not an ASCII letter, it is returned unchanged.

To change the case of a whole string, use StrToUpper.

Examples


toupper(&#039;a&#039;) -&gt; &#039;A&#039;
toupper(&#039;A&#039;) -&gt; &#039;A&#039;
toupper(&#039;/&#039;) -&gt; &#039;/&#039; // not a letter
toupper(&#039;ä&#039;) -&gt; &#039;ä&#039; // non-ASCII character</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Apr 2017 14:36:35 +0000</pubDate>
        </item>
        <item>
            <title>UnpackByteX</title>
            <link>https://acsutils.strangled.net/functions:unpackbytex?rev=1492451246&amp;do=diff</link>
            <description>UnpackByteX

packing

	*  int UnpackByte1(int packed)
	*  int UnpackByte2(int packed)
	*  int UnpackByte3(int packed)
	*  int UnpackByte4(int packed)

Description

Returns the Xth byte of the integer. Intended to extract values packed with PackBytes.

Examples

See PackBytes for examples.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:47:26 +0000</pubDate>
        </item>
        <item>
            <title>UnpackShortX</title>
            <link>https://acsutils.strangled.net/functions:unpackshortx?rev=1492451281&amp;do=diff</link>
            <description>UnpackShortX

packing

	*  int UnpackShort1(int packed)
	*  int UnpackShort2(int packed)

Description

Return the first and second two bytes respectively from the integer. The result is interpreted as a signed short (-32768 to 32767).

Intended to extract values packed with</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 17 Apr 2017 17:48:01 +0000</pubDate>
        </item>
        <item>
            <title>UpdateCursor</title>
            <link>https://acsutils.strangled.net/functions:updatecursor?rev=1497363323&amp;do=diff</link>
            <description>UpdateCursor

cursor

void UpdateCursor()

Description

Reads the activator&#039;s mouse input and turns it into cursor motion. Takes the following cvars into account so that the cursor is not affected by game mouse settings:

	*  mouse_sensitivity
	*  m_yaw
	*  m_pitch</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 13 Jun 2017 14:15:23 +0000</pubDate>
        </item>
        <item>
            <title>VectorLength3D</title>
            <link>https://acsutils.strangled.net/functions:vectorlength3d?rev=1562421869&amp;do=diff</link>
            <description>VectorLength3D

math vectors

fixed VectorLength3D(fixed x, fixed y, fixed z)

Description

Returns the length of the given 3D vector.

Example

Show 3D distance between actors:


int x = GetActorX(tid2) - GetActorX(tid1);
int y = GetActorY(tid2) - GetActorY(tid1);
int z = GetActorZ(tid2) - GetActorZ(tid1);
int distance = length3d(x, y, z),
print(s:&quot;The two actors are &quot;, f:distance, s:&quot; mapunits apart in 3D space&quot;);</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 06 Jul 2019 14:04:29 +0000</pubDate>
        </item>
        <item>
            <title>VectorToAngles</title>
            <link>https://acsutils.strangled.net/functions:vectortoangles?rev=1555793776&amp;do=diff</link>
            <description>VectorToAngles

math vectors

angle, angle VectorToAngles(fixed x, fixed y, fixed z)

angle - a fixed-point ZDoom angle (not degrees or radians)

This function returns multiple values.

Description

Converts a 3D vector to a pair of angles (yaw and pitch).

Examples

Make the player look along the vector:


VectorToAngles(1.0, 2.0, 3.0);
int angle = r1;
int pitch = r2;

SetActorAngle(tid, angle);
SetActorPitch(tid, -pitch); // Note that actor pitch is inverted in ZDoom.</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 20 Apr 2019 20:56:16 +0000</pubDate>
        </item>
    </channel>
</rss>
