<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.eduke32.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sangman</id>
	<title>EDukeWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eduke32.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sangman"/>
	<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/wiki/Special:Contributions/Sangman"/>
	<updated>2026-05-14T16:35:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.47.0-alpha</generator>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Sectsetinterpolation&amp;diff=14926</id>
		<title>Sectsetinterpolation</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Sectsetinterpolation&amp;diff=14926"/>
		<updated>2025-01-03T14:04:59Z</updated>

		<summary type="html">&lt;p&gt;Sangman: recreate cause I needed it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;sectsetinterpolation&#039;&#039;&#039; &amp;lt;sectnum&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Applies interpolation on the movement of a specific sector.&lt;br /&gt;
Useful for smoothing sector movement executed via CON, typically by moving its wallpoints using [[dragpoint]].&lt;br /&gt;
&lt;br /&gt;
Sector coordinates update every 30 tics, which will look jittery by default. This command as the name suggests will enable interpolation of these updates.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
| &amp;lt;sectnum&amp;gt; || Number of the sector.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Somethingonplayer&amp;diff=14842</id>
		<title>Somethingonplayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Somethingonplayer&amp;diff=14842"/>
		<updated>2023-12-03T22:08:29Z</updated>

		<summary type="html">&lt;p&gt;Sangman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If a slimer is currently attached to the player, this holds the slimer&#039;s sprite ID.  Otherwise, this is -1.&lt;br /&gt;
&lt;br /&gt;
To kill the slimer from code, we can&#039;t just apply [[htextra]] as we would expect, the correct way to kill a facehugging slimer is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    ifn player[].somethingonplayer -1&lt;br /&gt;
    {&lt;br /&gt;
        seta[player[].somethingonplayer].htextra 1&lt;br /&gt;
        seta[player[].somethingonplayer].htg_t 0 0&lt;br /&gt;
        setp[].somethingonplayer -1&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Player structure members]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Somethingonplayer&amp;diff=14841</id>
		<title>Somethingonplayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Somethingonplayer&amp;diff=14841"/>
		<updated>2023-12-03T22:07:59Z</updated>

		<summary type="html">&lt;p&gt;Sangman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If a slimer is currently attached to the player, this holds the slimer&#039;s sprite ID.  Otherwise, this is -1.&lt;br /&gt;
&lt;br /&gt;
To kill the slimer from code, we can&#039;t just apply [[htextra]] as we would expect, the correct way to kill a facehugging slimer is this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    ifn player[].somethingonplayer -1&lt;br /&gt;
    {&lt;br /&gt;
        seta[player[].somethingonplayer].htextra 1&lt;br /&gt;
        seta[player[].somethingonplayer].htg_t 0 0&lt;br /&gt;
        setp[].somethingonplayer -1&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Player structure members]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Quote&amp;diff=14840</id>
		<title>Quote</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Quote&amp;diff=14840"/>
		<updated>2023-11-26T20:58:35Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Specified fta/ftq&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;quote&#039;&#039;&#039; &amp;lt;quote number&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Causes the quote &amp;lt;quote number&amp;gt; as defined by [[definequote]] to be displayed on the top of the screen, center aligned.  The quote fades out after two seconds. This command requires a context where the player is defined, e.g. it cannot be used in [[EVENT_LOADACTOR]].&lt;br /&gt;
&lt;br /&gt;
Quotes also appear in the console and log file, but when the same quote is displayed multiple times in a row, only the first instance will appear in the console and log. This applies &#039;&#039;even if the quote has been redefined&#039;&#039;. To log things for debugging or analysis, consider [[userquote]] instead.&lt;br /&gt;
&lt;br /&gt;
This command will only accept a numeric constant, however it is possible to display a quote number that is specified in a variable. For this, see player structure members [[fta]] and [[ftq]]. Set fta to 99 and ftq to the variable.&lt;br /&gt;
&lt;br /&gt;
[[Category:Duke3D 1.3/1.5 commands]]&lt;br /&gt;
[[Category:Screen drawing commands]]&lt;br /&gt;
[[Category:String manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Avel&amp;diff=14839</id>
		<title>Avel</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Avel&amp;diff=14839"/>
		<updated>2023-11-09T21:40:00Z</updated>

		<summary type="html">&lt;p&gt;Sangman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The avel member of the input structure holds the value of the player&#039;s current &amp;quot;angle velocity&amp;quot;, corresponding to the analog input assigned to turning. Digital turning normally sets this to +/-30.&lt;br /&gt;
&lt;br /&gt;
The avel/q16avel member can be modified to slow down the player&#039;s turn rate, but for such a scenario this must be done using the event EVENT_PREUPDATEANGLES.&lt;br /&gt;
[[Category:Input structure members]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14812</id>
		<title>Checkactivatormotion</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14812"/>
		<updated>2022-12-30T01:23:20Z</updated>

		<summary type="html">&lt;p&gt;Sangman: corrected var name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; &amp;lt;lotag&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks to see if the activator with the lotag specified is in motion or not - if it is, than [[RETURN]] is set to 1.&lt;br /&gt;
&lt;br /&gt;
==Detecting MasterSwitch motion==&lt;br /&gt;
&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; only detects activator motions, but it won&#039;t return 1 if it&#039;s a delayed masterswitch that goes off. &lt;br /&gt;
Fortunately, there is a way to check for this. When a MasterSwitch starts moving, the sprite is deleted, meaning that we can catch it in EVENT_KILLIT and act appropriately.&lt;br /&gt;
&lt;br /&gt;
One way to handle this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var MASTERSWITCH_SUBSCRIPTION 0 2 &lt;br /&gt;
var MASTERSWITCH_RETURN 0 2&lt;br /&gt;
var temp 0 2&lt;br /&gt;
var temp2 0 2&lt;br /&gt;
&lt;br /&gt;
appendevent EVENT_KILLIT&lt;br /&gt;
    ifactor MASTERSWITCH&lt;br /&gt;
    {&lt;br /&gt;
        for temp sprofstat 1&lt;br /&gt;
        {&lt;br /&gt;
            getav[temp].MASTERSWITCH_SUBSCRIPTION temp2&lt;br /&gt;
&lt;br /&gt;
            ife temp2 sprite[].lotag&lt;br /&gt;
                setav[temp].MASTERSWITCH_RETURN 1&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
endevent&lt;br /&gt;
&lt;br /&gt;
useractor notenemy MASTERSWITCHHANDLER // this actor has to do something if it detects the masterswitch is moving&lt;br /&gt;
    set MASTERSWITCH_SUBSCRIPTION &amp;lt;lotag to check&amp;gt;&lt;br /&gt;
    ife MASTERSWITCH_RETURN 1&lt;br /&gt;
    {&lt;br /&gt;
        // do stuff&lt;br /&gt;
        set MASTERSWITCH_RETURN 0 // remember to reset this or whatever code will keep triggering&lt;br /&gt;
    }&lt;br /&gt;
enda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Sizeto&amp;diff=14420</id>
		<title>Sizeto</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Sizeto&amp;diff=14420"/>
		<updated>2021-11-15T21:44:50Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Some input from Dan&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;sizeto&#039;&#039;&#039; &amp;lt;xrepeat&amp;gt; &amp;lt;yrepeat&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Gradually sizes the current [[actor]]&#039;s x and y sizes to the given values. 64 64 is the default sprite size.  See [[sizeat]].&lt;br /&gt;
The speed of the sizing can be increased by calling sizeto multiple times in a row.&lt;br /&gt;
&lt;br /&gt;
[[Category:Duke3D 1.3/1.5 commands]]&lt;br /&gt;
[[Category:Sprite manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Validate_maximum_difference_between_two_angles&amp;diff=14207</id>
		<title>Validate maximum difference between two angles</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Validate_maximum_difference_between_two_angles&amp;diff=14207"/>
		<updated>2021-04-06T15:03:14Z</updated>

		<summary type="html">&lt;p&gt;Sangman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this example code, we will validate that angle A does not exceed angle B by 512 units. If it does, RETURN is set to 1. &lt;br /&gt;
It assumes temp, temp2 and temp3 variables are declared.&lt;br /&gt;
The tricky part in this comparison is that angles wrap back around to 0 when reaching 2048, this must be taken into account when comparing angle difference.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var MAX_ANGLE_DIFF 0 2&lt;br /&gt;
var ANGLE_A 0 2&lt;br /&gt;
var ANGLE_B&lt;br /&gt;
defstate check_max_angle_diff&lt;br /&gt;
    set temp2 ANGLE_B&lt;br /&gt;
    sub temp2 MAX_ANGLE_DIFF&lt;br /&gt;
&lt;br /&gt;
    set temp3 ANGLE_B&lt;br /&gt;
    add temp3 MAX_ANGLE_DIFF&lt;br /&gt;
	&lt;br /&gt;
    ifl temp2 0&lt;br /&gt;
        add temp2 2048&lt;br /&gt;
&lt;br /&gt;
    ifge temp3 2048&lt;br /&gt;
        sub temp3 2048&lt;br /&gt;
		&lt;br /&gt;
    set temp 0&lt;br /&gt;
    set RETURN 0&lt;br /&gt;
    ifl temp3 temp2&lt;br /&gt;
    {&lt;br /&gt;
        // we wrapped around the 0/2048 line, either case is enough&lt;br /&gt;
        ifl ANGLE_A temp3&lt;br /&gt;
            set temp 1&lt;br /&gt;
        else ifg ANGLE_A temp2&lt;br /&gt;
            set temp 1&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        // we didn&#039;t wrap around so needs to be inbetween [temp2-temp3]&lt;br /&gt;
        ifge ANGLE_A temp2&lt;br /&gt;
            ifle ANGLE_A temp3&lt;br /&gt;
            set temp 1&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ife temp 1&lt;br /&gt;
        set RETURN 0&lt;br /&gt;
    else&lt;br /&gt;
        set RETURN 1&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The state can be called like this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // determine some angles, store in ANGLE_A and ANGLE_B&lt;br /&gt;
    set MAX_ANGLE_DIFF 512&lt;br /&gt;
    state check_max_angle_diff&lt;br /&gt;
    // Return 0 means we&#039;re within 512 angle units&lt;br /&gt;
    ife RETURN 0&lt;br /&gt;
    {&lt;br /&gt;
        // do stuff&lt;br /&gt;
    }&lt;br /&gt;
    // or if we&#039;re outside the range&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        // do other stuff&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Validate_maximum_difference_between_two_angles&amp;diff=14206</id>
		<title>Validate maximum difference between two angles</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Validate_maximum_difference_between_two_angles&amp;diff=14206"/>
		<updated>2021-04-06T15:01:11Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Added tutorial for something that was doing my head in last night&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this example code, we will validate that angle A does not exceed angle B by 512 units. If it does, RETURN is set to 1. &lt;br /&gt;
It assumes temp, temp2 and temp3 variables are declared.&lt;br /&gt;
The tricky part in this comparison is that angles wrap back around to 0 when reaching 2048, this must be taken into account when comparing angle difference.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var MAX_ANGLE_DIFF 0 2&lt;br /&gt;
var ANGLE_A 0 2&lt;br /&gt;
var ANGLE_B&lt;br /&gt;
defstate check_max_angle_diff&lt;br /&gt;
    set temp2 ANGLE_B&lt;br /&gt;
    sub temp2 MAX_ANGLE_DIFF&lt;br /&gt;
&lt;br /&gt;
    set temp3 ANGLE_B&lt;br /&gt;
    add temp3 MAX_ANGLE_DIFF&lt;br /&gt;
	&lt;br /&gt;
    ifl temp2 0&lt;br /&gt;
        add temp2 2048&lt;br /&gt;
&lt;br /&gt;
    ifge temp3 2048&lt;br /&gt;
        sub temp3 2048&lt;br /&gt;
		&lt;br /&gt;
    set temp 0&lt;br /&gt;
    set RETURN 0&lt;br /&gt;
    ifl temp3 temp2&lt;br /&gt;
    {&lt;br /&gt;
        // we wrapped around the 0/2048 line, either case is enough&lt;br /&gt;
        ifl ANGLE_A temp3&lt;br /&gt;
            set temp 1&lt;br /&gt;
        else ifg ANGLE_A temp2&lt;br /&gt;
            set temp 1&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        // we didn&#039;t wrap around so needs to be inbetween [temp2-temp3]&lt;br /&gt;
        ifge ANGLE_A temp2&lt;br /&gt;
            ifle ANGLE_A temp3&lt;br /&gt;
            set temp 1&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ife temp 1&lt;br /&gt;
        set RETURN 0&lt;br /&gt;
    else&lt;br /&gt;
        set RETURN 1&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Tutorials&amp;diff=14205</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Tutorials&amp;diff=14205"/>
		<updated>2021-04-06T14:56:16Z</updated>

		<summary type="html">&lt;p&gt;Sangman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are a few basic tutorials which show off some things made possible by EDuke32&#039;s enhanced [[scripting]] system.  Want more examples?  Download one of the many existing EDuke32 mods, open up the CON files and dig in!&lt;br /&gt;
&lt;br /&gt;
If you&#039;re completely new to CON and are unfamiliar with scripting in general, we recommend reading [[Confaq42]] first followed by reading the basics in [[Scripting]], then tinkering with Duke3D&#039;s GAME.CON based on what you&#039;ve learned.&lt;br /&gt;
&lt;br /&gt;
==Table of Tutorials==&lt;br /&gt;
&amp;lt;table width=80%  class=wikitable&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
  &amp;lt;th rowspan=1&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;th colspan=5&amp;gt;Difficulty Level 1 - 4&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Artificial_Intelligence_101|Artificial Intelligence 101]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Change_the_Loading_Screen_Background|Change the loading screen background]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Value_controlled_rain_code|Control rain on a fine scale]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Breakable Actor|Create Breakable Actors]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_display_negative_numbers_with_the_digital_font|Display negative numbers with the digital font]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Eliminate_Shrunk_Enemies_Attacking_Bug|Eliminate the &amp;quot;shrunk enemies attacking&amp;quot; bug]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_manually_reload|How to code a manual reload for the pistol]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Improve_The_Third_Person_View_with_Zoom|Improve the third person view with zoom]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Limit_the_height_of_the_player&#039;s_jump|Limit/extend the player&#039;s jumping height]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_make_a_health_bar|Make a health bar]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_make_a_clock|Make a in-game clock]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_make_a_sprint_key|Make a sprint key]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Make_a_Working_Keypad|Make a working keypad]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Shoot_Different_Kinds_of_RPGs|Make actors shoot different types of RPGs]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Make_actor_aim_vertical|Make an actor aim vertically at another]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Make_Controllable_Security_Cameras|Make controllable security cameras]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Make_Models_Pitch|Make models pitch on sloped surfaces]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Make_one_actor_face_another|Make one actor face another]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Validate_maximum_difference_between_two_angles|Validate maximum difference between two angles]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Make_Nightvision_light_rooms|Make the night vision goggles light up darkened areas]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Make_the_Player_Swim_Like_Modern_FPS|Make the player swim like in a modern FPS]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[How_to_Make_the_Screen_Tilt_While_Using_Jetpack|Make the screen tilt while using jetpack]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Prevent_fall_damage_or_falling_death|Prevent damage/death from long falls]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Eliminate_player_self-damage|Prevent players/actors from inflicting self-damage]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr align=center&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;[[Play a movie file when starting an episode]]&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;*&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Floorbunch&amp;diff=14203</id>
		<title>Floorbunch</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Floorbunch&amp;diff=14203"/>
		<updated>2021-03-26T00:16:13Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Created page with &amp;quot;Returns the bunch number of a TROR layer, if any. Returns -1 if the floor is not part of a bunch.  See Room Over Room.  Category:Sector structure members&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns the bunch number of a TROR layer, if any. Returns -1 if the floor is not part of a bunch.&lt;br /&gt;
&lt;br /&gt;
See [[Room Over Room]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Sector structure members]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Ceilingbunch&amp;diff=14202</id>
		<title>Ceilingbunch</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Ceilingbunch&amp;diff=14202"/>
		<updated>2021-03-26T00:16:05Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Created page with &amp;quot;Returns the bunch number of a TROR layer, if any. Returns -1 if the ceiling is not part of a bunch.  See Room Over Room.  Category:Sector structure members&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns the bunch number of a TROR layer, if any. Returns -1 if the ceiling is not part of a bunch.&lt;br /&gt;
&lt;br /&gt;
See [[Room Over Room]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Sector structure members]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14201</id>
		<title>Checkactivatormotion</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14201"/>
		<updated>2021-03-25T20:35:52Z</updated>

		<summary type="html">&lt;p&gt;Sangman: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; &amp;lt;lotag&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks to see if the activator with the lotag specified is in motion or not - if it is, than [[RETURN]] is set to 1.&lt;br /&gt;
&lt;br /&gt;
==Detecting MasterSwitch motion==&lt;br /&gt;
&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; only detects activator motions, but it won&#039;t return 1 if it&#039;s a delayed masterswitch that goes off. &lt;br /&gt;
Fortunately, there is a way to check for this. When a MasterSwitch starts moving, the sprite is deleted, meaning that we can catch it in EVENT_KILLIT and act appropriately.&lt;br /&gt;
&lt;br /&gt;
One way to handle this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var MASTERSWITCH_SUBSCRIPTION 0 2 &lt;br /&gt;
var MASTERSWITCH_RETURN 0 2&lt;br /&gt;
var temp 0 2&lt;br /&gt;
var temp2 0 2&lt;br /&gt;
&lt;br /&gt;
appendevent EVENT_KILLIT&lt;br /&gt;
    ifactor MASTERSWITCH&lt;br /&gt;
    {&lt;br /&gt;
        for temp sprofstat 1&lt;br /&gt;
        {&lt;br /&gt;
            getav[temp].MASTERSWITCH_SUBSCRIBE temp2&lt;br /&gt;
&lt;br /&gt;
            ife temp2 sprite[].lotag&lt;br /&gt;
                setav[temp].MASTERSWITCH_RETURN 1&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
endevent&lt;br /&gt;
&lt;br /&gt;
useractor notenemy MASTERSWITCHHANDLER // this actor has to do something if it detects the masterswitch is moving&lt;br /&gt;
    set MASTERSWITCH_SUBSCRIPTION &amp;lt;lotag to check&amp;gt;&lt;br /&gt;
    ife MASTERSWITCH_RETURN 1&lt;br /&gt;
    {&lt;br /&gt;
        // do stuff&lt;br /&gt;
        set MASTERSWITCH_RETURN 0 // remember to reset this or whatever code will keep triggering&lt;br /&gt;
    }&lt;br /&gt;
enda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14200</id>
		<title>Checkactivatormotion</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14200"/>
		<updated>2021-03-25T20:35:40Z</updated>

		<summary type="html">&lt;p&gt;Sangman: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; &amp;lt;lotag&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks to see if the activator with the lotag specified is in motion or not - if it is, than [[RETURN]] is set to 1.&lt;br /&gt;
&lt;br /&gt;
==Detecting MasterSwitch motion==&lt;br /&gt;
&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; only detects activator motions, but it won&#039;t return 1 if it&#039;s a delayed masterswitch that goes off. &lt;br /&gt;
Fortunately, there is a way to check for this. When a MasterSwitch starts moving, the sprite is deleted, meaning that we can catch it in EVENT_KILLIT and act appropriately.&lt;br /&gt;
&lt;br /&gt;
One way to handle this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var MASTERSWITCH_SUBSCRIPTION 0 2 &lt;br /&gt;
var MASTERSWITCH_RETURN 0 2&lt;br /&gt;
var temp 0 2&lt;br /&gt;
var temp2 0 2&lt;br /&gt;
&lt;br /&gt;
appendevent EVENT_KILLIT&lt;br /&gt;
    ifactor MASTERSWITCH&lt;br /&gt;
    {&lt;br /&gt;
        for temp sprofstat 1&lt;br /&gt;
        {&lt;br /&gt;
            getav[temp].MASTERSWITCH_SUBSCRIBE temp2&lt;br /&gt;
&lt;br /&gt;
            ife temp2 sprite[].lotag&lt;br /&gt;
		        setav[temp].MASTERSWITCH_RETURN 1&lt;br /&gt;
        }    &lt;br /&gt;
    }&lt;br /&gt;
endevent&lt;br /&gt;
&lt;br /&gt;
useractor notenemy MASTERSWITCHHANDLER // this actor has to do something if it detects the masterswitch is moving&lt;br /&gt;
    set MASTERSWITCH_SUBSCRIPTION &amp;lt;lotag to check&amp;gt;&lt;br /&gt;
    ife MASTERSWITCH_RETURN 1&lt;br /&gt;
    {&lt;br /&gt;
        // do stuff&lt;br /&gt;
        set MASTERSWITCH_RETURN 0 // remember to reset this or whatever code will keep triggering&lt;br /&gt;
    }&lt;br /&gt;
enda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14199</id>
		<title>Checkactivatormotion</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Checkactivatormotion&amp;diff=14199"/>
		<updated>2021-03-25T20:34:55Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Described how to calculate the same thing for masterswitches&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; &amp;lt;lotag&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Checks to see if the activator with the lotag specified is in motion or not - if it is, than [[RETURN]] is set to 1.&lt;br /&gt;
&lt;br /&gt;
==Detecting MasterSwitch motion==&lt;br /&gt;
&#039;&#039;&#039;checkactivatormotion&#039;&#039;&#039; only detects activator motions, but it won&#039;t return 1 if it&#039;s a delayed masterswitch that goes off. &lt;br /&gt;
Fortunately, there is a way to check for this. When a MasterSwitch starts moving, the sprite is deleted, meaning that we can catch it in EVENT_KILLIT and act appropriately.&lt;br /&gt;
&lt;br /&gt;
One way to handle this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var MASTERSWITCH_SUBSCRIPTION 0 2 &lt;br /&gt;
var MASTERSWITCH_RETURN 0 2&lt;br /&gt;
var temp 0 2&lt;br /&gt;
var temp2 0 2&lt;br /&gt;
&lt;br /&gt;
appendevent EVENT_KILLIT&lt;br /&gt;
    ifactor MASTERSWITCH&lt;br /&gt;
    {&lt;br /&gt;
		for temp sprofstat 1&lt;br /&gt;
		{&lt;br /&gt;
			getav[temp].MASTERSWITCH_SUBSCRIBE temp2&lt;br /&gt;
			&lt;br /&gt;
			ife temp2 sprite[].lotag&lt;br /&gt;
		        setav[temp].MASTERSWITCH_RETURN 1&lt;br /&gt;
		}    &lt;br /&gt;
    }&lt;br /&gt;
endevent&lt;br /&gt;
&lt;br /&gt;
useractor notenemy MASTERSWITCHHANDLER // this actor has to do something if it detects the masterswitch is moving&lt;br /&gt;
    set MASTERSWITCH_SUBSCRIPTION &amp;lt;lotag to check&amp;gt;&lt;br /&gt;
    ife MASTERSWITCH_RETURN 1&lt;br /&gt;
    {&lt;br /&gt;
        // do stuff&lt;br /&gt;
        set MASTERSWITCH_RETURN 0 // remember to reset this or whatever code will keep triggering&lt;br /&gt;
    }&lt;br /&gt;
enda&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Movesprite&amp;diff=14041</id>
		<title>Movesprite</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Movesprite&amp;diff=14041"/>
		<updated>2020-12-04T00:53:44Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Velocity calculation example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;movesprite&#039;&#039;&#039; &amp;lt;[[sprite id]]&amp;gt; &amp;lt;xvel&amp;gt; &amp;lt;yvel&amp;gt; &amp;lt;zvel&amp;gt; &amp;lt;[[clipmask]]&amp;gt; &amp;lt;returnvar&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This page is incomplete. Please help us by filling in additional information.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
movesprite gives the capability to move an [[actor]] along an arbitrary x, y, or z velocity and adjust the [[clipmask]] used, thereby changing what the actor will collide with. The variable &amp;lt;returnvar&amp;gt; will equal [[htmovflag]], which will be either 0 or the id of what was hit. This is sectioned by different areas of the struct. &amp;lt;s&amp;gt;Add 16384 to &amp;lt;returnvar&amp;gt; to get the result of the sprite structure member that may have been hit for example.&amp;lt;/s&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Critical notes:&#039;&#039;&#039; It is possible that &amp;lt;zvel&amp;gt; will be non-functional unless &amp;quot;fall&amp;quot; is called immediately before movesprite. Also movesprite and [[move]] commands do not mix well. You are likely to get unintended results.&lt;br /&gt;
&lt;br /&gt;
===Calculating appropriate velocity values===&lt;br /&gt;
With the regular move command we can simply pass in a horizontal speed value, but for movesprite we need to separate this into velocities on the x and y axis.&lt;br /&gt;
Here&#039;s one method of doing this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
defstate movesprite_state&lt;br /&gt;
	geta[].ang angvar&lt;br /&gt;
	cos my_cos angvar&lt;br /&gt;
	sin my_sin angvar&lt;br /&gt;
&lt;br /&gt;
        // divide or multiply the cos and sin values to change the speed.&lt;br /&gt;
        // default result is already quite fast so you probably want to divide (shiftr)&lt;br /&gt;
	shiftr my_cos 4&lt;br /&gt;
	shiftr my_sin 4&lt;br /&gt;
&lt;br /&gt;
	movesprite THISACTOR my_cos my_sin zvel CLIPMASK0 RETURN&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;br /&gt;
[[Category:Sprite manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Move&amp;diff=14040</id>
		<title>Move</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Move&amp;diff=14040"/>
		<updated>2020-12-04T00:49:48Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Link to movesprite&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A move command is used to give velocity to an [[actor]].&lt;br /&gt;
&lt;br /&gt;
Define outside an actor as so:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;move&#039;&#039;&#039; &amp;lt;name&amp;gt; &amp;lt;horizontal&amp;gt; &amp;lt;vertical&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; is the name of the move command.&lt;br /&gt;
&lt;br /&gt;
Warning: You &#039;&#039;&#039;cannot&#039;&#039;&#039; use the same name from a [[define]], or the game will crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;horizontal&amp;gt; is the horizontal velocity of the [[actor]]. Negative values reverse direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vertical&amp;gt; is the vertical veloctity of the [[actor]]. Negative values cause upward motion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Used inside an [[actor]], a move command is written as:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;move&#039;&#039;&#039; &amp;lt;name&amp;gt; &amp;lt;moveflags...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;moveflags...&amp;gt; is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior.&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;&#039;cannot&#039;&#039;&#039; substitute &amp;lt;name&amp;gt; for a number, define, or gamevar. It has to be predefined with the first definition of move.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If your case requires the actor moving clips through sprites and/or walls, you need to pass in a custom clipmask. This command does not support that, see [[movesprite]].&lt;br /&gt;
&lt;br /&gt;
==moveflags==&lt;br /&gt;
&lt;br /&gt;
Values for each &amp;lt;moveflag&amp;gt; (defined in DEFS.CON) are:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
!moveflag!!description!!internal value!!&lt;br /&gt;
|-&lt;br /&gt;
|faceplayer&lt;br /&gt;
|[[actor]] faces the player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;1&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|geth&lt;br /&gt;
|use horizontal velocity.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|getv&lt;br /&gt;
|use vertical velocity.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|randomangle&lt;br /&gt;
|[[actor]] will face random direction.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|faceplayerslow&lt;br /&gt;
|same as faceplayer, but done gradually.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;16&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|spin&lt;br /&gt;
|spin in a clockwise circle.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;32&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|faceplayersmart&lt;br /&gt;
|same as faceplayer, but with a slight &amp;quot;lead&amp;quot; on position.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;64&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|fleeenemy&lt;br /&gt;
|[[actor]] faces away from the player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;128&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|jumptoplayer&lt;br /&gt;
|[[actor]] will move vertically and then fall as if jumping.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;257&#039;&#039;&#039;*&lt;br /&gt;
|-&lt;br /&gt;
|seekplayer&lt;br /&gt;
|[[actor]] will try to find the best path to the nearest player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;512&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|furthestdir&lt;br /&gt;
|[[actor]] faces the furthest distance from the closest player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;1024&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|dodgebullet&lt;br /&gt;
|[[actor]] attempts to avoid all shots directed at him. The [[actor]] will not avoid GROWSPARK.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;4096&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Making a Useractor move==&lt;br /&gt;
A [[useractor]] can be made to move as part of a given [[action]]. The type of the useractor (ie. Enemy/Notenemy) has an impact on how this functions.&lt;br /&gt;
Typically one might expect that we can apply the move on each tic of the action but it doesn&#039;t work that way for type Enemy. For that type, a move is started with a &amp;quot;momentum&amp;quot;. If it is applied on each tic, the actor will not move at all. On each tic it must be checked if the actor is already moving, and only call the move if they aren&#039;t. &lt;br /&gt;
&lt;br /&gt;
This behaviour does not occur for a Notenemy useractor type.&lt;br /&gt;
&lt;br /&gt;
In other words, for a Notenemy, this is sufficient:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifaction MYACTION&lt;br /&gt;
{&lt;br /&gt;
    move mymove // and apply whatever other flags, e.g. geth&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an Enemy, use this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifaction MYACTION&lt;br /&gt;
{&lt;br /&gt;
    ifmove mymove {} // alternatively: ifmove mymove nullop&lt;br /&gt;
    else &lt;br /&gt;
        move mymove&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Duke3D 1.3/1.5 commands]]&lt;br /&gt;
[[Category:Sprite manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Getzrange&amp;diff=14039</id>
		<title>Getzrange</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Getzrange&amp;diff=14039"/>
		<updated>2020-12-04T00:45:32Z</updated>

		<summary type="html">&lt;p&gt;Sangman: spritebridge example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;getzrange&#039;&#039;&#039; &amp;lt;x&amp;gt; &amp;lt;y&amp;gt; &amp;lt;z&amp;gt; &amp;lt;sector&amp;gt; &#039;&#039;&amp;lt;ceilingz&amp;gt;&#039;&#039; &#039;&#039;&amp;lt;ceilinghit&amp;gt;&#039;&#039; &#039;&#039;&amp;lt;floorz&amp;gt;&#039;&#039; &#039;&#039;&amp;lt;floorhit&amp;gt;&#039;&#039; &amp;lt;walldist&amp;gt; &amp;lt;clipmask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given a starting point and its containing sector, calculate (1) the z coordinates of (2) the objects that would be first hit by a quadratic, floor-aligned sprite pointing parallel to the grid and having side length 2*&amp;lt;walldist&amp;gt;, when travelling in a straight line up- and downwards (respectively for &amp;lt;ceiling...&amp;gt; and &amp;lt;floor...&amp;gt;). The &amp;lt;clipmask&amp;gt; is specified in the same fashion as in [[hitscan]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;lt;ceilinghit&amp;gt;&#039;&#039; and &#039;&#039;&amp;lt;floorhit&amp;gt;&#039;&#039; can take the following values:&amp;lt;br&amp;gt;&lt;br /&gt;
* 16384 + sectnum, if a ceiling or floor was hit first&amp;lt;br&amp;gt;&lt;br /&gt;
* 49152 + spritenum, if a sprite was hit first&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The behaviour in corner cases (sectnum invalid, x/y/z not in sectnum, etc.) should not be relied upon.&lt;br /&gt;
&lt;br /&gt;
===Example: Checking for spritebridges===&lt;br /&gt;
The state below checks if the current actor is on a spritebridge, and if so, &amp;quot;returns&amp;quot; the id of that sprite.&lt;br /&gt;
&lt;br /&gt;
 // assumption: relevant variables are declared&lt;br /&gt;
 defstate check_spritebridge&lt;br /&gt;
 	 geta[].x my_x&lt;br /&gt;
 	 geta[].y my_y&lt;br /&gt;
 	 geta[].z my_z&lt;br /&gt;
 	 geta[].sectnum sectnum&lt;br /&gt;
 	 &lt;br /&gt;
 	 getzrange my_x my_y my_z sectnum&lt;br /&gt;
 		 ceilingz&lt;br /&gt;
 		 ceilinghit&lt;br /&gt;
 		 floorz&lt;br /&gt;
 		 floorhit&lt;br /&gt;
 		 256&lt;br /&gt;
  		 CLIPMASK0&lt;br /&gt;
 		&lt;br /&gt;
 	set outputSpriteId -1&lt;br /&gt;
 	ifge floorhit 49152&lt;br /&gt;
 	{&lt;br /&gt;
 		sub floorhit 49152&lt;br /&gt;
 		&lt;br /&gt;
 		ifvarand sprite[floorhit].cstat 32&lt;br /&gt;
 			set outputSpriteId floorhit&lt;br /&gt;
 	}&lt;br /&gt;
        &lt;br /&gt;
        // outputSpriteId now contains either -1 if no spritebridge is detected, or the id of the spritebridge if there is&lt;br /&gt;
 ends&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Spritebridge&amp;diff=14038</id>
		<title>Spritebridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Spritebridge&amp;diff=14038"/>
		<updated>2020-12-04T00:37:24Z</updated>

		<summary type="html">&lt;p&gt;Sangman: link to getzrange for non-player actor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This has a value of 1 if the player is standing on a floor sprite (such as the bridge in Duke3D&#039;s E1L1; from r1450 onwards, also if standing on a wall sprite).  Otherwise, the value is 0.  See [[sbs]].&lt;br /&gt;
&lt;br /&gt;
Non-player actors do not have a spritebridge property, but the equivalent information for them can be calculated using [[getzrange]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Player structure members]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Abs&amp;diff=14037</id>
		<title>Abs</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Abs&amp;diff=14037"/>
		<updated>2020-12-04T00:35:56Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;abs&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;lt;value&amp;gt;&amp;#039;&amp;#039;  Calculates the absolute value of &amp;lt;value&amp;gt; and stores it back into &amp;lt;value&amp;gt;.  Category:Gamevar manipulation&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;abs&#039;&#039;&#039; &#039;&#039;&amp;lt;value&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Calculates the absolute value of &amp;lt;value&amp;gt; and stores it back into &amp;lt;value&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Gamevar manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14036</id>
		<title>Hitscan</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14036"/>
		<updated>2020-11-17T22:43:44Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Bit more explanation (probably a bit too much heh) on hitwall/hitsprite&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;hitscan&#039;&#039;&#039; &amp;lt;x1&amp;gt; &amp;lt;y1&amp;gt; &amp;lt;z1&amp;gt; &amp;lt;sect1&amp;gt; &amp;lt;cos of ang&amp;gt; &amp;lt;sin of ang&amp;gt; &amp;lt;zvel&amp;gt; &amp;lt;hit sector return var&amp;gt; &amp;lt;hit wall return var&amp;gt; &amp;lt;hit sprite return var&amp;gt; &amp;lt;hit x return var&amp;gt; &amp;lt;hit y return var&amp;gt; &amp;lt;hit z return var&amp;gt; &amp;lt;clip mask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hitscan returns the values of what would be hit if one travelled in a straight line from a set of coordinates in a specified direction.&lt;br /&gt;
&lt;br /&gt;
All parameters are [[gamevar | gamevars]].  The first three are the coordinates from which the hitscan occurs, followed by the scanning sector.  The [[cos]], then the [[sin]] of an angle (typically the [[ang]] of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan.  The six return gamevars hold the values of what the hitscan hits.  The value of [[clipmask]] tells hitscan which sorts of things it can hit.  A [[clipmask]] of 4294901808 is useful for most purposes.&lt;br /&gt;
&lt;br /&gt;
HITWALL and HITSPRITE&#039;s default value is -1. They will be filled up with the wall id or sprite id that is hit. In other words, if running hitscan against an actor and HITWALL&#039;s value is not -1, that means the target actor is not hit. If it is hit, HITSPRITE will be set to the id of the actor.&lt;br /&gt;
&lt;br /&gt;
Example of hitscan originating from the player:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//  This state will return the sector, wall, and sprite(id, x ,y, and z data)currently under the crosshair.&lt;br /&gt;
 &lt;br /&gt;
state checkhitscan&lt;br /&gt;
	getplayer[THISACTOR].posx MY_X&lt;br /&gt;
	getplayer[THISACTOR].posy MY_Y&lt;br /&gt;
	getplayer[THISACTOR].posz MY_Z&lt;br /&gt;
	getplayer[THISACTOR].cursectnum MY_SECTOR&lt;br /&gt;
	getplayer[THISACTOR].ang MY_ANGLE&lt;br /&gt;
	getplayer[THISACTOR].horiz MY_ZDIST&lt;br /&gt;
	subvar MY_ZDIST 100&lt;br /&gt;
	mulvar MY_ZDIST -2048&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the hitscan does not originate from the player but from another actor, the code is a bit different:&lt;br /&gt;
* Ensure the hitscan cstat bit is set on the target actor&lt;br /&gt;
* The angle needs to be calculated&lt;br /&gt;
* The zdist calculation is different&lt;br /&gt;
* If appropriate, the &amp;quot;my_z&amp;quot; coordinate needs to be shifted up to the &amp;quot;eye level&amp;quot; of the actor. You should be able to get away with using a constant value around 4096-8192 for most cases, but it depends on the exact height of the actor.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
state checkhitscan&lt;br /&gt;
	geta[].x MY_X&lt;br /&gt;
	geta[].y MY_Y&lt;br /&gt;
	geta[].z MY_Z&lt;br /&gt;
	geta[].sectnum MY_SECTOR&lt;br /&gt;
&lt;br /&gt;
        geta[otheractor].x OTHER_X&lt;br /&gt;
	geta[otheractor].y OTHER_Y&lt;br /&gt;
	geta[otheractor].y OTHER_Z&lt;br /&gt;
	geta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
	seta[otheractor].cstat 256 // enable hitscan bit is set or the sprite will not be detected&lt;br /&gt;
	&lt;br /&gt;
	// Calculate angle&lt;br /&gt;
	sub OTHER_X MY_X&lt;br /&gt;
	sub OTHER_Y MY_Y&lt;br /&gt;
	getangle MY_ANGLE OTHER_X OTHER_Y&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
	&lt;br /&gt;
	// Calculate zdist&lt;br /&gt;
	set MY_ZDIST OTHER_Z&lt;br /&gt;
	sub MY_ZDIST MY_Z&lt;br /&gt;
	shiftvarl MY_ZDIST 14&lt;br /&gt;
	ldist xydist THISACTOR otheractor&lt;br /&gt;
	ife xydist 0 set xydist 1&lt;br /&gt;
	divvarvar MY_ZDIST xydist&lt;br /&gt;
	&lt;br /&gt;
	// Bring Z position to &amp;quot;eye level&amp;quot;, exact value needed here depends on height of the sprite&lt;br /&gt;
	// This could maybe also be calculated using ysize&lt;br /&gt;
	sub MY_Z 8192&lt;br /&gt;
	&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
	&lt;br /&gt;
	// reinstate original cstat (useful in case the sprite you&#039;re checking against is a non-blocking effect sprite for instance)&lt;br /&gt;
	seta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;br /&gt;
[[Category:Gamevar manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14035</id>
		<title>Hitscan</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14035"/>
		<updated>2020-11-17T22:39:51Z</updated>

		<summary type="html">&lt;p&gt;Sangman: some text changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;hitscan&#039;&#039;&#039; &amp;lt;x1&amp;gt; &amp;lt;y1&amp;gt; &amp;lt;z1&amp;gt; &amp;lt;sect1&amp;gt; &amp;lt;cos of ang&amp;gt; &amp;lt;sin of ang&amp;gt; &amp;lt;zvel&amp;gt; &amp;lt;hit sector return var&amp;gt; &amp;lt;hit wall return var&amp;gt; &amp;lt;hit sprite return var&amp;gt; &amp;lt;hit x return var&amp;gt; &amp;lt;hit y return var&amp;gt; &amp;lt;hit z return var&amp;gt; &amp;lt;clip mask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hitscan returns the values of what would be hit if one travelled in a straight line from a set of coordinates in a specified direction.&lt;br /&gt;
&lt;br /&gt;
All parameters are [[gamevar | gamevars]].  The first three are the coordinates from which the hitscan occurs, followed by the scanning sector.  The [[cos]], then the [[sin]] of an angle (typically the [[ang]] of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan.  The six return gamevars hold the values of what the hitscan hits.  The value of [[clipmask]] tells hitscan which sorts of things it can hit.  A [[clipmask]] of 4294901808 is useful for most purposes.&lt;br /&gt;
&lt;br /&gt;
Example of hitscan originating from the player:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//  This state will return the sector, wall, and sprite(id, x ,y, and z data)currently under the crosshair.&lt;br /&gt;
 &lt;br /&gt;
state checkhitscan&lt;br /&gt;
	getplayer[THISACTOR].posx MY_X&lt;br /&gt;
	getplayer[THISACTOR].posy MY_Y&lt;br /&gt;
	getplayer[THISACTOR].posz MY_Z&lt;br /&gt;
	getplayer[THISACTOR].cursectnum MY_SECTOR&lt;br /&gt;
	getplayer[THISACTOR].ang MY_ANGLE&lt;br /&gt;
	getplayer[THISACTOR].horiz MY_ZDIST&lt;br /&gt;
	subvar MY_ZDIST 100&lt;br /&gt;
	mulvar MY_ZDIST -2048&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the hitscan does not originate from the player but from another actor, the code is a bit different:&lt;br /&gt;
* Ensure the hitscan cstat bit is set on the target actor&lt;br /&gt;
* The angle needs to be calculated&lt;br /&gt;
* The zdist calculation is different&lt;br /&gt;
* If appropriate, the &amp;quot;my_z&amp;quot; coordinate needs to be shifted up to the &amp;quot;eye level&amp;quot; of the actor. You should be able to get away with using a constant value around 4096-8192 for most cases, but it depends on the exact height of the actor.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
state checkhitscan&lt;br /&gt;
	geta[].x MY_X&lt;br /&gt;
	geta[].y MY_Y&lt;br /&gt;
	geta[].z MY_Z&lt;br /&gt;
	geta[].sectnum MY_SECTOR&lt;br /&gt;
&lt;br /&gt;
        geta[otheractor].x OTHER_X&lt;br /&gt;
	geta[otheractor].y OTHER_Y&lt;br /&gt;
	geta[otheractor].y OTHER_Z&lt;br /&gt;
	geta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
	seta[otheractor].cstat 256 // enable hitscan bit is set or the sprite will not be detected&lt;br /&gt;
	&lt;br /&gt;
	// Calculate angle&lt;br /&gt;
	sub OTHER_X MY_X&lt;br /&gt;
	sub OTHER_Y MY_Y&lt;br /&gt;
	getangle MY_ANGLE OTHER_X OTHER_Y&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
	&lt;br /&gt;
	// Calculate zdist&lt;br /&gt;
	set MY_ZDIST OTHER_Z&lt;br /&gt;
	sub MY_ZDIST MY_Z&lt;br /&gt;
	shiftvarl MY_ZDIST 14&lt;br /&gt;
	ldist xydist THISACTOR otheractor&lt;br /&gt;
	ife xydist 0 set xydist 1&lt;br /&gt;
	divvarvar MY_ZDIST xydist&lt;br /&gt;
	&lt;br /&gt;
	// Bring Z position to &amp;quot;eye level&amp;quot;, exact value needed here depends on height of the sprite&lt;br /&gt;
	// This could maybe also be calculated using ysize&lt;br /&gt;
	sub MY_Z 8192&lt;br /&gt;
	&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
	&lt;br /&gt;
	// reinstate original cstat (useful in case the sprite you&#039;re checking against is a non-blocking effect sprite for instance)&lt;br /&gt;
	seta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;br /&gt;
[[Category:Gamevar manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14034</id>
		<title>Hitscan</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14034"/>
		<updated>2020-11-17T22:39:03Z</updated>

		<summary type="html">&lt;p&gt;Sangman: unordered list fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;hitscan&#039;&#039;&#039; &amp;lt;x1&amp;gt; &amp;lt;y1&amp;gt; &amp;lt;z1&amp;gt; &amp;lt;sect1&amp;gt; &amp;lt;cos of ang&amp;gt; &amp;lt;sin of ang&amp;gt; &amp;lt;zvel&amp;gt; &amp;lt;hit sector return var&amp;gt; &amp;lt;hit wall return var&amp;gt; &amp;lt;hit sprite return var&amp;gt; &amp;lt;hit x return var&amp;gt; &amp;lt;hit y return var&amp;gt; &amp;lt;hit z return var&amp;gt; &amp;lt;clip mask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hitscan returns the values of what would be hit if one travelled in a straight line from a set of coordinates in a specified direction.&lt;br /&gt;
&lt;br /&gt;
All parameters are [[gamevar | gamevars]].  The first three are the coordinates from which the hitscan occurs, followed by the scanning sector.  The [[cos]], then the [[sin]] of an angle (typically the [[ang]] of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan.  The six return gamevars hold the values of what the hitscan hits.  The value of [[clipmask]] tells hitscan which sorts of things it can hit.  A [[clipmask]] of 4294901808 is useful for most purposes.&lt;br /&gt;
&lt;br /&gt;
Example of hitscan:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//  This state will return the sector, wall, and sprite(id, x ,y, and z data)currently under the crosshair.&lt;br /&gt;
 &lt;br /&gt;
state checkhitscan&lt;br /&gt;
	getplayer[THISACTOR].posx MY_X&lt;br /&gt;
	getplayer[THISACTOR].posy MY_Y&lt;br /&gt;
	getplayer[THISACTOR].posz MY_Z&lt;br /&gt;
	getplayer[THISACTOR].cursectnum MY_SECTOR&lt;br /&gt;
	getplayer[THISACTOR].ang MY_ANGLE&lt;br /&gt;
	getplayer[THISACTOR].horiz MY_ZDIST&lt;br /&gt;
	subvar MY_ZDIST 100&lt;br /&gt;
	mulvar MY_ZDIST -2048&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the hitscan is between two actors, the code is a bit different:&lt;br /&gt;
* Ensure the hitscan cstat bit is set on the target actor&lt;br /&gt;
* The angle needs to be calculated&lt;br /&gt;
* The zdist calculation is different&lt;br /&gt;
* If appropriate, the &amp;quot;my_z&amp;quot; coordinate needs to be shifted up to the &amp;quot;eye level&amp;quot; of the actor. You should be able to get away with using a constant value around 4096-8192 for most cases, but it depends on the exact height of the actor.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
state checkhitscan&lt;br /&gt;
	geta[].x MY_X&lt;br /&gt;
	geta[].y MY_Y&lt;br /&gt;
	geta[].z MY_Z&lt;br /&gt;
	geta[].sectnum MY_SECTOR&lt;br /&gt;
&lt;br /&gt;
        geta[otheractor].x OTHER_X&lt;br /&gt;
	geta[otheractor].y OTHER_Y&lt;br /&gt;
	geta[otheractor].y OTHER_Z&lt;br /&gt;
	geta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
	seta[otheractor].cstat 256 // enable hitscan bit is set or the sprite will not be detected&lt;br /&gt;
	&lt;br /&gt;
	// Calculate angle&lt;br /&gt;
	sub OTHER_X MY_X&lt;br /&gt;
	sub OTHER_Y MY_Y&lt;br /&gt;
	getangle MY_ANGLE OTHER_X OTHER_Y&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
	&lt;br /&gt;
	// Calculate zdist&lt;br /&gt;
	set MY_ZDIST OTHER_Z&lt;br /&gt;
	sub MY_ZDIST MY_Z&lt;br /&gt;
	shiftvarl MY_ZDIST 14&lt;br /&gt;
	ldist xydist THISACTOR otheractor&lt;br /&gt;
	ife xydist 0 set xydist 1&lt;br /&gt;
	divvarvar MY_ZDIST xydist&lt;br /&gt;
	&lt;br /&gt;
	// Bring Z position to &amp;quot;eye level&amp;quot;, exact value needed here depends on height of the sprite&lt;br /&gt;
	// This could maybe also be calculated using ysize&lt;br /&gt;
	sub MY_Z 8192&lt;br /&gt;
	&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
	&lt;br /&gt;
	// reinstate original cstat (useful in case the sprite you&#039;re checking against is a non-blocking effect sprite for instance)&lt;br /&gt;
	seta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;br /&gt;
[[Category:Gamevar manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14033</id>
		<title>Hitscan</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Hitscan&amp;diff=14033"/>
		<updated>2020-11-17T22:36:30Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Description of hitscan between two actors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;hitscan&#039;&#039;&#039; &amp;lt;x1&amp;gt; &amp;lt;y1&amp;gt; &amp;lt;z1&amp;gt; &amp;lt;sect1&amp;gt; &amp;lt;cos of ang&amp;gt; &amp;lt;sin of ang&amp;gt; &amp;lt;zvel&amp;gt; &amp;lt;hit sector return var&amp;gt; &amp;lt;hit wall return var&amp;gt; &amp;lt;hit sprite return var&amp;gt; &amp;lt;hit x return var&amp;gt; &amp;lt;hit y return var&amp;gt; &amp;lt;hit z return var&amp;gt; &amp;lt;clip mask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hitscan returns the values of what would be hit if one travelled in a straight line from a set of coordinates in a specified direction.&lt;br /&gt;
&lt;br /&gt;
All parameters are [[gamevar | gamevars]].  The first three are the coordinates from which the hitscan occurs, followed by the scanning sector.  The [[cos]], then the [[sin]] of an angle (typically the [[ang]] of the actor performing the scan) come next, followed by the z angle, which must be calculated before the hitscan.  The six return gamevars hold the values of what the hitscan hits.  The value of [[clipmask]] tells hitscan which sorts of things it can hit.  A [[clipmask]] of 4294901808 is useful for most purposes.&lt;br /&gt;
&lt;br /&gt;
Example of hitscan:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//  This state will return the sector, wall, and sprite(id, x ,y, and z data)currently under the crosshair.&lt;br /&gt;
 &lt;br /&gt;
state checkhitscan&lt;br /&gt;
	getplayer[THISACTOR].posx MY_X&lt;br /&gt;
	getplayer[THISACTOR].posy MY_Y&lt;br /&gt;
	getplayer[THISACTOR].posz MY_Z&lt;br /&gt;
	getplayer[THISACTOR].cursectnum MY_SECTOR&lt;br /&gt;
	getplayer[THISACTOR].ang MY_ANGLE&lt;br /&gt;
	getplayer[THISACTOR].horiz MY_ZDIST&lt;br /&gt;
	subvar MY_ZDIST 100&lt;br /&gt;
	mulvar MY_ZDIST -2048&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the hitscan is between two actors, the code is a bit different:&lt;br /&gt;
- Ensure the hitscan cstat bit is set on the target actor&lt;br /&gt;
- The angle needs to be calculated&lt;br /&gt;
- The zdist calculation is different&lt;br /&gt;
- If appropriate, the &amp;quot;my_z&amp;quot; coordinate needs to be shifted up to the &amp;quot;eye level&amp;quot; of the actor. You should be able to get away with using a constant value around 4096-8192 for most cases, but it depends on the exact height of the actor.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
state checkhitscan&lt;br /&gt;
	geta[].x MY_X&lt;br /&gt;
	geta[].y MY_Y&lt;br /&gt;
	geta[].z MY_Z&lt;br /&gt;
	geta[].sectnum MY_SECTOR&lt;br /&gt;
&lt;br /&gt;
        geta[otheractor].x OTHER_X&lt;br /&gt;
	geta[otheractor].y OTHER_Y&lt;br /&gt;
	geta[otheractor].y OTHER_Z&lt;br /&gt;
	geta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
	seta[otheractor].cstat 256 // enable hitscan bit is set or the sprite will not be detected&lt;br /&gt;
	&lt;br /&gt;
	// Calculate angle&lt;br /&gt;
	sub OTHER_X MY_X&lt;br /&gt;
	sub OTHER_Y MY_Y&lt;br /&gt;
	getangle MY_ANGLE OTHER_X OTHER_Y&lt;br /&gt;
	cos MY_COS MY_ANGLE&lt;br /&gt;
	sin MY_SIN MY_ANGLE&lt;br /&gt;
	&lt;br /&gt;
	// Calculate zdist&lt;br /&gt;
	set MY_ZDIST OTHER_Z&lt;br /&gt;
	sub MY_ZDIST MY_Z&lt;br /&gt;
	shiftvarl MY_ZDIST 14&lt;br /&gt;
	ldist xydist THISACTOR otheractor&lt;br /&gt;
	ife xydist 0 set xydist 1&lt;br /&gt;
	divvarvar MY_ZDIST xydist&lt;br /&gt;
	&lt;br /&gt;
	// Bring Z position to &amp;quot;eye level&amp;quot;, exact value needed here depends on height of the sprite&lt;br /&gt;
	// This could maybe also be calculated using ysize&lt;br /&gt;
	sub MY_Z 8192&lt;br /&gt;
	&lt;br /&gt;
	hitscan MY_X MY_Y MY_Z MY_SECTOR MY_COS MY_SIN MY_ZDIST HITSECTOR HITWALL HITSPRITE HITX HITY HITZ 4294901808&lt;br /&gt;
	&lt;br /&gt;
	// reinstate original cstat (useful in case the sprite you&#039;re checking against is a non-blocking effect sprite for instance)&lt;br /&gt;
	seta[otheractor].cstat CSTAT_BACKUP&lt;br /&gt;
ends&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:EDuke32 specific commands]]&lt;br /&gt;
[[Category:Gamevar manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Move&amp;diff=13654</id>
		<title>Move</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Move&amp;diff=13654"/>
		<updated>2020-02-22T22:06:56Z</updated>

		<summary type="html">&lt;p&gt;Sangman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A move command is used to give velocity to an [[actor]].&lt;br /&gt;
&lt;br /&gt;
Define outside an actor as so:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;move&#039;&#039;&#039; &amp;lt;name&amp;gt; &amp;lt;horizontal&amp;gt; &amp;lt;vertical&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; is the name of the move command.&lt;br /&gt;
&lt;br /&gt;
Warning: You &#039;&#039;&#039;cannot&#039;&#039;&#039; use the same name from a [[define]], or the game will crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;horizontal&amp;gt; is the horizontal velocity of the [[actor]]. Negative values reverse direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vertical&amp;gt; is the vertical veloctity of the [[actor]]. Negative values cause upward motion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Used inside an [[actor]], a move command is written as:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;move&#039;&#039;&#039; &amp;lt;name&amp;gt; &amp;lt;moveflags...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;moveflags...&amp;gt; is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior.&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;&#039;cannot&#039;&#039;&#039; substitute &amp;lt;name&amp;gt; for a number, define, or gamevar. It has to be predefined with the first definition of move.&lt;br /&gt;
&lt;br /&gt;
==moveflags==&lt;br /&gt;
&lt;br /&gt;
Values for each &amp;lt;moveflag&amp;gt; (defined in DEFS.CON) are:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
!moveflag!!description!!internal value!!&lt;br /&gt;
|-&lt;br /&gt;
|faceplayer&lt;br /&gt;
|[[actor]] faces the player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;1&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|geth&lt;br /&gt;
|use horizontal velocity.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|getv&lt;br /&gt;
|use vertical velocity.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|randomangle&lt;br /&gt;
|[[actor]] will face random direction.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|faceplayerslow&lt;br /&gt;
|same as faceplayer, but done gradually.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;16&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|spin&lt;br /&gt;
|spin in a clockwise circle.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;32&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|faceplayersmart&lt;br /&gt;
|same as faceplayer, but with a slight &amp;quot;lead&amp;quot; on position.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;64&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|fleeenemy&lt;br /&gt;
|[[actor]] faces away from the player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;128&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|jumptoplayer&lt;br /&gt;
|[[actor]] will move vertically and then fall as if jumping.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;257&#039;&#039;&#039;*&lt;br /&gt;
|-&lt;br /&gt;
|seekplayer&lt;br /&gt;
|[[actor]] will try to find the best path to the nearest player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;512&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|furthestdir&lt;br /&gt;
|[[actor]] faces the furthest distance from the closest player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;1024&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|dodgebullet&lt;br /&gt;
|[[actor]] attempts to avoid all shots directed at him. The [[actor]] will not avoid GROWSPARK.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;4096&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Making a Useractor move==&lt;br /&gt;
A [[useractor]] can be made to move as part of a given [[action]]. The type of the useractor (ie. Enemy/Notenemy) has an impact on how this functions.&lt;br /&gt;
Typically one might expect that we can apply the move on each tic of the action but it doesn&#039;t work that way for type Enemy. For that type, a move is started with a &amp;quot;momentum&amp;quot;. If it is applied on each tic, the actor will not move at all. On each tic it must be checked if the actor is already moving, and only call the move if they aren&#039;t. &lt;br /&gt;
&lt;br /&gt;
This behaviour does not occur for a Notenemy useractor type.&lt;br /&gt;
&lt;br /&gt;
In other words, for a Notenemy, this is sufficient:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifaction MYACTION&lt;br /&gt;
{&lt;br /&gt;
    move mymove // and apply whatever other flags, e.g. geth&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an Enemy, use this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifaction MYACTION&lt;br /&gt;
{&lt;br /&gt;
    ifmove mymove {} // alternatively: ifmove mymove nullop&lt;br /&gt;
    else &lt;br /&gt;
        move mymove&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Duke3D 1.3/1.5 commands]]&lt;br /&gt;
[[Category:Sprite manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Move&amp;diff=13652</id>
		<title>Move</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Move&amp;diff=13652"/>
		<updated>2020-02-22T22:02:35Z</updated>

		<summary type="html">&lt;p&gt;Sangman: Describe difference of move handling between Enemy/Notenemy&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A move command is used to give velocity to an [[actor]].&lt;br /&gt;
&lt;br /&gt;
Define outside an actor as so:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;move&#039;&#039;&#039; &amp;lt;name&amp;gt; &amp;lt;horizontal&amp;gt; &amp;lt;vertical&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;name&amp;gt; is the name of the move command.&lt;br /&gt;
&lt;br /&gt;
Warning: You &#039;&#039;&#039;cannot&#039;&#039;&#039; use the same name from a [[define]], or the game will crash.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;horizontal&amp;gt; is the horizontal velocity of the [[actor]]. Negative values reverse direction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vertical&amp;gt; is the vertical veloctity of the [[actor]]. Negative values cause upward motion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Used inside an [[actor]], a move command is written as:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;move&#039;&#039;&#039; &amp;lt;name&amp;gt; &amp;lt;moveflags...&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;moveflags...&amp;gt; is a (possibly empty) sequence of parameters that specify certain hardcoded movement behavior.&lt;br /&gt;
&lt;br /&gt;
You &#039;&#039;&#039;cannot&#039;&#039;&#039; substitute &amp;lt;name&amp;gt; for a number, define, or gamevar. It has to be predefined with the first definition of move.&lt;br /&gt;
&lt;br /&gt;
==moveflags==&lt;br /&gt;
&lt;br /&gt;
Values for each &amp;lt;moveflag&amp;gt; (defined in DEFS.CON) are:&lt;br /&gt;
&lt;br /&gt;
{| {{prettytable}}&lt;br /&gt;
!moveflag!!description!!internal value!!&lt;br /&gt;
|-&lt;br /&gt;
|faceplayer&lt;br /&gt;
|[[actor]] faces the player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;1&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|geth&lt;br /&gt;
|use horizontal velocity.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;2&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|getv&lt;br /&gt;
|use vertical velocity.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;4&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|randomangle&lt;br /&gt;
|[[actor]] will face random direction.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;8&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|faceplayerslow&lt;br /&gt;
|same as faceplayer, but done gradually.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;16&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|spin&lt;br /&gt;
|spin in a clockwise circle.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;32&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|faceplayersmart&lt;br /&gt;
|same as faceplayer, but with a slight &amp;quot;lead&amp;quot; on position.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;64&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|fleeenemy&lt;br /&gt;
|[[actor]] faces away from the player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;128&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|jumptoplayer&lt;br /&gt;
|[[actor]] will move vertically and then fall as if jumping.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;257&#039;&#039;&#039;*&lt;br /&gt;
|-&lt;br /&gt;
|seekplayer&lt;br /&gt;
|[[actor]] will try to find the best path to the nearest player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;512&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|furthestdir&lt;br /&gt;
|[[actor]] faces the furthest distance from the closest player.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;1024&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|dodgebullet&lt;br /&gt;
|[[actor]] attempts to avoid all shots directed at him. The [[actor]] will not avoid GROWSPARK.&lt;br /&gt;
|align=&amp;quot;right&amp;quot;|&#039;&#039;&#039;4096&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Making a Useractor move==&lt;br /&gt;
A [[useractor]] can be made to move as part of a given [[action]]. The type of the useractor (ie. Enemy/Notenemy) has an impact on how this functions.&lt;br /&gt;
Typically one might expect that we can apply the move on each tic of the action but it doesn&#039;t work that way for type Enemy. For that type, a move is started with a &amp;quot;momentum&amp;quot;. If it is applied on each tic, the actor will not move at all. On each tic it must be checked if the actor is already moving, and only call the move if they aren&#039;t. &lt;br /&gt;
&lt;br /&gt;
This behaviour does not occur for a Notenemy useractor type.&lt;br /&gt;
&lt;br /&gt;
In other words, for a Notenemy, this is sufficient:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifaction MYACTION&lt;br /&gt;
{&lt;br /&gt;
    move mymove // and apply whatever other flags, e.g. geth&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For an Enemy, use this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ifaction MYACTION&lt;br /&gt;
{&lt;br /&gt;
    ifmove mymove {}&lt;br /&gt;
    else &lt;br /&gt;
        move mymove&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Duke3D 1.3/1.5 commands]]&lt;br /&gt;
[[Category:Sprite manipulation]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
	<entry>
		<id>https://wiki.eduke32.com/w/index.php?title=Make_actor_aim_vertical&amp;diff=12704</id>
		<title>Make actor aim vertical</title>
		<link rel="alternate" type="text/html" href="https://wiki.eduke32.com/w/index.php?title=Make_actor_aim_vertical&amp;diff=12704"/>
		<updated>2019-09-06T19:51:44Z</updated>

		<summary type="html">&lt;p&gt;Sangman: New way to do this based on Hendricks&amp;#039; suggestion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this example, the [[actor]] will find the closest LIZTROOP actor within 2048 units and calculate the vertical angle it needs to aim at. This code is an example of how to use the [[zshoot]] command to create friendly bots and other similar effects. The following does not contain the [[gamevar]] definitions, which must be placed outside of the actor code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
findnearactor LIZTROOP 2048 ACTOR2&lt;br /&gt;
ifvarn ACTOR2 -1&lt;br /&gt;
{&lt;br /&gt;
        ldist TEMP THISACTOR ACTOR2&lt;br /&gt;
        getprojectile[SHOTSPARK1].vel PROJECTILE_VEL&lt;br /&gt;
&lt;br /&gt;
        ifn PROJECTILE_VEL 0&lt;br /&gt;
            div TEMP PROJECTILE_VEL // distance / projectile velocity = the amount of tics it would take for the projectile to reach the player&#039;s position (regardless of Z coordinate)&lt;br /&gt;
&lt;br /&gt;
        getactor[THISACTOR].z TEMP2&lt;br /&gt;
        getactor[ACTOR2].z TEMP3&lt;br /&gt;
        sub TEMP3 TEMP2 &lt;br /&gt;
&lt;br /&gt;
        ifn TEMP 0&lt;br /&gt;
            div TEMP3 TEMP&lt;br /&gt;
&lt;br /&gt;
        zshoot TEMP3 SHOTSPARK1 &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>Sangman</name></author>
	</entry>
</feed>