<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=SetMonsterNavigationMode</id>
	<title>SetMonsterNavigationMode - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g1r-mp.com/wiki/index.php?action=history&amp;feed=atom&amp;title=SetMonsterNavigationMode"/>
	<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=SetMonsterNavigationMode&amp;action=history"/>
	<updated>2026-09-19T06:22:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://g1r-mp.com/wiki/index.php?title=SetMonsterNavigationMode&amp;diff=706&amp;oldid=prev</id>
		<title>QCherry: Document Lua APIs available or improved from G1R:MP 0.1.2</title>
		<link rel="alternate" type="text/html" href="https://g1r-mp.com/wiki/index.php?title=SetMonsterNavigationMode&amp;diff=706&amp;oldid=prev"/>
		<updated>2026-09-03T18:40:08Z</updated>

		<summary type="html">&lt;p&gt;Document Lua APIs available or improved from G1R:MP 0.1.2&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= setMonsterNavigationMode =&lt;br /&gt;
&amp;lt;div style=&amp;quot;background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; font-weight:bold; letter-spacing:0.04em;&amp;quot;&amp;gt;AVAILABLE FROM UPDATE 0.1.2&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#111111; margin-top:0.25rem;&amp;quot;&amp;gt;This function is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selects built-in or resource-scripted movement for a resource-owned monster.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool setMonsterNavigationMode(string monsterId, string mode)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;monsterId&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || yes || The opaque decimal monster identifier returned by &amp;lt;code&amp;gt;spawnMonster&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;getMonsters&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;mode&amp;lt;/code&amp;gt; || &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; || yes || Case-sensitive movement mode: &amp;lt;code&amp;gt;&amp;quot;builtin&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;scripted&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; when the requested mode is valid and accepted; otherwise returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
Give a resource direct movement control over a ground monster:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot; line&amp;gt;&lt;br /&gt;
if setMonsterNavigationMode(monsterId, &amp;quot;scripted&amp;quot;) then&lt;br /&gt;
    setMonsterMoveGoal(monsterId, 25.0, 12.0, 3.0)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Available only in server-side resource scripts.&lt;br /&gt;
* Only the resource that created the monster may change its navigation mode.&lt;br /&gt;
* New monsters start in &amp;lt;code&amp;gt;&amp;quot;builtin&amp;quot;&amp;lt;/code&amp;gt; mode. Built-in mode keeps the normal server pathing, avoidance, pursuit, return-home and formation movement.&lt;br /&gt;
* In &amp;lt;code&amp;gt;&amp;quot;scripted&amp;quot;&amp;lt;/code&amp;gt; mode, direct resource goals replace those built-in movement decisions. The server still owns collision, targeting, attacks, damage, health and death; this function never makes movement or combat client-authoritative.&lt;br /&gt;
* Changing between modes stops the monster and clears both its current direct move goal and any built-in movement command. Repeating the current mode is a successful no-op.&lt;br /&gt;
* Scripted navigation is ground-only and is rejected for flying monster types. It does not provide flying, arbitrary vertical control or moving-platform attachment.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Functions]]&lt;br /&gt;
[[Category:Server Functions]]&lt;br /&gt;
[[Category:World Functions]]&lt;br /&gt;
[[Category:Monster Functions]]&lt;/div&gt;</summary>
		<author><name>QCherry</name></author>
	</entry>
</feed>