<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mygamingtalk.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Creating_a_script</id>
	<title>Creating a script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mygamingtalk.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Creating_a_script"/>
	<link rel="alternate" type="text/html" href="https://mygamingtalk.com/wiki/index.php?title=Creating_a_script&amp;action=history"/>
	<updated>2026-05-05T20:28:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://mygamingtalk.com/wiki/index.php?title=Creating_a_script&amp;diff=1385&amp;oldid=prev</id>
		<title>Palota: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://mygamingtalk.com/wiki/index.php?title=Creating_a_script&amp;diff=1385&amp;oldid=prev"/>
		<updated>2023-02-13T07:02:31Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:02, 13 February 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Palota</name></author>
	</entry>
	<entry>
		<id>https://mygamingtalk.com/wiki/index.php?title=Creating_a_script&amp;diff=1384&amp;oldid=prev</id>
		<title>Palota: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://mygamingtalk.com/wiki/index.php?title=Creating_a_script&amp;diff=1384&amp;oldid=prev"/>
		<updated>2021-07-13T19:05:43Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Run the game and load the map you wish to create script for.&lt;br /&gt;
&lt;br /&gt;
Open the console and type the following:&lt;br /&gt;
&lt;br /&gt;
    /bot makemapgm&lt;br /&gt;
&lt;br /&gt;
This will create file &amp;quot;&amp;lt;mapname&amp;gt;.gm&amp;quot; in your &amp;#039;&amp;#039;&amp;#039;~/omni-bot/et/user&amp;#039;&amp;#039;&amp;#039; folder.&lt;br /&gt;
&lt;br /&gt;
You must move file from &amp;#039;&amp;#039;&amp;#039;~/omni-bot/et/user&amp;#039;&amp;#039;&amp;#039; folder to &amp;#039;&amp;#039;&amp;#039;~/omni-bot/et/nav&amp;#039;&amp;#039;&amp;#039; folder.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Note: for other games change &amp;#039;et&amp;#039; to either &amp;#039;rtcw&amp;#039; &amp;#039;d3&amp;#039; or &amp;#039;q4&amp;#039; depending on the game you are running.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Make sure you have backed up any mapname.gm file you may have been working on that exists in the nav folder.&lt;br /&gt;
&lt;br /&gt;
Open the file in a text editor and you will see an extended version of this example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt; &lt;br /&gt;
global Map =&lt;br /&gt;
{&lt;br /&gt;
	Debug = 1, // please set to zero before distributing your script&lt;br /&gt;
&lt;br /&gt;
	Command_Post_Built = function( trigger )&lt;br /&gt;
	{&lt;br /&gt;
		Util.MapDebugPrint( &amp;quot;Command_Post_Built&amp;quot; );&lt;br /&gt;
	},&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
global OnMapLoad = function()&lt;br /&gt;
{&lt;br /&gt;
	// Register callback functions&lt;br /&gt;
	OnTrigger( &amp;quot;MISSING_STRING&amp;quot;, Map.Command_Post_Built );&lt;br /&gt;
&lt;br /&gt;
	//~Util.DisableGoal( &amp;quot;.*&amp;quot;, true ); // all but routes&lt;br /&gt;
	//~SetAvailableMapGoals( TEAM.AXIS, true, &amp;quot;ATTACK_.*&amp;quot; );&lt;br /&gt;
	//~SetAvailableMapGoals( TEAM.ALLIES, true, &amp;quot;ATTACK_.*&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
	// Max users per goal&lt;br /&gt;
	//Util.SetMaxUsers( 1, &amp;quot;DEFEND_.*&amp;quot; );&lt;br /&gt;
	//Util.SetMaxUsers( 1, &amp;quot;GRENADE_.*&amp;quot; );&lt;br /&gt;
	//Util.SetMaxUsers( 1, &amp;quot;MOUNTMG42_.*&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
	// Camp times&lt;br /&gt;
	SetMapGoalProperties( &amp;quot;MOUNTMG42_.*&amp;quot;, {MinCampTime=15, MaxCampTime=90} );&lt;br /&gt;
	SetMapGoalProperties( &amp;quot;MOBILEMG42_.*&amp;quot;, {MinCampTime=10, MaxCampTime=60} );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Util.MapDebugPrint( &amp;quot;Omni-bot map script for &amp;quot; + GetMapName() + &amp;quot; executed.&amp;quot; );&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
global OnBotJoin = function( bot )&lt;br /&gt;
{&lt;br /&gt;
	// Uncomment for shootable breakables&lt;br /&gt;
	//~bot.TargetBreakableDist = 90.0;&lt;br /&gt;
	// Only set MaxViewDistance on maps with limited sight (e.g. fog)&lt;br /&gt;
	//~bot.MaxViewDistance = 2400;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
global InitializeRoutes = function()&lt;br /&gt;
{&lt;br /&gt;
	MapRoutes =&lt;br /&gt;
	{&lt;br /&gt;
		BUILD_Command_Post =&lt;br /&gt;
		{&lt;br /&gt;
		},&lt;br /&gt;
	};&lt;br /&gt;
	Util.Routes(MapRoutes);&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Global &amp;#039;&amp;#039;&amp;#039;Map&amp;#039;&amp;#039;&amp;#039; object contains many automatically generated functions related to map. You can add more functions into Map object.&lt;br /&gt;
&lt;br /&gt;
Global function &amp;#039;&amp;#039;&amp;#039;OnMapLoad&amp;#039;&amp;#039;&amp;#039; is executed once when game starts after waypoints and goals are loaded. It is used to register [[Triggers]], create [[Trigger regions]], set goals  [[Availability]], [[Priority]], [[Camp times]], [[Max users]].&lt;br /&gt;
&lt;br /&gt;
Global function &amp;#039;&amp;#039;&amp;#039;OnBotJoin&amp;#039;&amp;#039;&amp;#039; is called for each bot once when the bot is added to the game.  Property TargetBreakableDist is explained in article [[Bots shooting map objects]]. Property MaxViewDistance should be set only if map has fog because it overrides difficulty settings.&lt;br /&gt;
&lt;br /&gt;
Global function &amp;#039;&amp;#039;&amp;#039;InitializeRoutes&amp;#039;&amp;#039;&amp;#039; is explained in article [[Template:Baserouting|Routing]].&lt;/div&gt;</summary>
		<author><name>Palota</name></author>
	</entry>
</feed>