<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.thedarkmod.com/index.php?action=history&amp;feed=atom&amp;title=AI_behaviour_depending_on_players_actions_%28new_version%29</id>
	<title>AI behaviour depending on players actions (new version) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.thedarkmod.com/index.php?action=history&amp;feed=atom&amp;title=AI_behaviour_depending_on_players_actions_%28new_version%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;action=history"/>
	<updated>2026-05-14T09:07:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;diff=19313&amp;oldid=prev</id>
		<title>Obsttorte at 14:18, 11 June 2017</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;diff=19313&amp;oldid=prev"/>
		<updated>2017-06-11T14:18:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:18, 11 June 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Editing]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Obsttorte</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;diff=15955&amp;oldid=prev</id>
		<title>Obsttorte at 10:31, 17 March 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;diff=15955&amp;oldid=prev"/>
		<updated>2013-03-17T10:31:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:31, 17 March 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- On every ai, set the spawnarg &amp;quot;scriptobject&amp;quot; &amp;quot;ai_stim&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- On every ai, set the spawnarg &amp;quot;scriptobject&amp;quot; &amp;quot;ai_stim&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- On flashbombs, flashmines and mines change the scriptobject spawnarg by adding &amp;quot;_stim&amp;quot; at the end&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- On flashbombs, flashmines and mines change the scriptobject spawnarg by adding &amp;quot;_stim&amp;quot; at the end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   Example: the flashbomb uses the scriptobject playertools_flashbomb by default, which you must change to playertools_flashbomb_stim&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   Example: the flashbomb uses the scriptobject playertools_flashbomb by default, which you must change to playertools_flashbomb_stim&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- On every piece of loot and other objects which the player should not be allowed to take add the spawnarg &amp;quot;frob_action_script&amp;quot; &amp;quot;frobsLoot&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;- On every piece of loot and other objects which the player should not be allowed to take add the spawnarg &amp;quot;frob_action_script&amp;quot; &amp;quot;frobsLoot&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Obsttorte</name></author>
	</entry>
	<entry>
		<id>https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;diff=15951&amp;oldid=prev</id>
		<title>Obsttorte: This article describes the steps needed for setting up missions, in which the ai is neutral to the player, but becomes hostile once he has done something forbidden.</title>
		<link rel="alternate" type="text/html" href="https://wiki.thedarkmod.com/index.php?title=AI_behaviour_depending_on_players_actions_(new_version)&amp;diff=15951&amp;oldid=prev"/>
		<updated>2013-03-17T10:25:02Z</updated>

		<summary type="html">&lt;p&gt;This article describes the steps needed for setting up missions, in which the ai is neutral to the player, but becomes hostile once he has done something forbidden.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
If you want to create a mission, in which the ai is neutral to the player, but becomes hostile if he sees him doing something forbidden, like for example stealing an object or picking a lock, you can use the following approach. The setup is, as you&amp;#039;ll se, pretty simple.&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
The first steps to do is to download the script file [http://forums.thedarkmod.com/topic/14394-apples-and-peaches-obsttortes-mapping-and-scripting-thread/page__view__findpost__p__307381, here] and put it in the script folder. In the same folder, create a file caled &amp;#039;&amp;#039;tdm_custom_scripts.script&amp;#039;&amp;#039; and put the following line in it&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;script/responseEffects.script&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Then go to your maps directory and create a file called &amp;#039;&amp;#039;mymapname.script&amp;#039;, where mymapname is the name of your map. Put the following lines in it&lt;br /&gt;
&lt;br /&gt;
  void main() {&lt;br /&gt;
    thread checkStatus();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. No moer scripting needed.&lt;br /&gt;
&lt;br /&gt;
== DarkRadiant ==&lt;br /&gt;
&lt;br /&gt;
There are some steps that need to be performed in DarkRadiant to get things working.&lt;br /&gt;
&lt;br /&gt;
- On every ai, set the spawnarg &amp;quot;scriptobject&amp;quot; &amp;quot;ai_stim&amp;quot;&lt;br /&gt;
- On flashbombs, flashmines and mines change the scriptobject spawnarg by adding &amp;quot;_stim&amp;quot; at the end&lt;br /&gt;
  Example: the flashbomb uses the scriptobject playertools_flashbomb by default, which you must change to playertools_flashbomb_stim&lt;br /&gt;
- On every piece of loot and other objects which the player should not be allowed to take add the spawnarg &amp;quot;frob_action_script&amp;quot; &amp;quot;frobsLoot&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to have areas where the player is allowed to be, and others where he isn&amp;#039;t, you need to use the zone system (via info_location_settings and info_location / info_location_seperator). On the &amp;#039;&amp;#039;info_location entities&amp;#039;&amp;#039; belonging to areas where the player is allowed to be, add &amp;quot;call_on_entry&amp;quot; &amp;quot;setNeutralZone&amp;quot;, on the entities belonging to not allowed areas, set &amp;quot;call_on_entry&amp;quot; &amp;quot;setHostileZone&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it.&lt;br /&gt;
--[[User:Obsttorte|Obsttorte]] ([[User talk:Obsttorte|talk]]) 06:25, 17 March 2013 (EDT)&lt;/div&gt;</summary>
		<author><name>Obsttorte</name></author>
	</entry>
</feed>