LuaAPI: Add SetGearAIHints
authorWuzzy
Tue, 20 Feb 2018 13:42:14 +0000
changeset 1224 90c14fae29f2
parent 1223 868b783afc88
child 1225 64b95a681971
LuaAPI: Add SetGearAIHints
LuaAPI.wiki
--- a/LuaAPI.wiki	Tue Feb 20 12:59:04 2018 +0000
+++ b/LuaAPI.wiki	Tue Feb 20 13:42:14 2018 +0000
@@ -920,6 +920,21 @@
 === <tt>!SetHogLevel(gearUid, level)</tt> ===
 Sets the bot level from 0 to 5. `0` means human player.
 
+=== `SetGearAIHints(gearUid, aiHint)` ===
+Set some behaviour hints for computer-controlled hedgehogs for any given gear with `gearUid`.
+
+Set `aiHint` to either of:
+
+ * `aihUsualProcessing`: AI hogs treat this gear the usual way. This is the default.
+ * `aihDoesntMatter`: AI hogs don't bother attacking this gear intentionally.
+
+Example:
+
+```
+SetGearAIHints(uselessHog, aihDoesntMatter)
+-- This makes AI hogs stop caring about attacking uselessHog
+```
+
 === <tt>!SetGearPos(gearUid, value) (0.9.18-dev)</tt> ===
 Sets the `Pos` value (not the position!) of the specified gear to specified value. See `GetGearPos` for more information.