Difference between revisions of "AI Lua API"

From Off Grid Wiki
Jump to navigation Jump to search
m (Rich moved page Lua Apis/AI Lua API to AI Lua API without leaving a redirect: removing sub-pages)
(Update)
Line 1: Line 1:
 +
<!-- This file is auto generated, please don't edit manually! -->
 
= AI =
 
= AI =
 
== Description ==
 
== Description ==
Line 17: Line 18:
  
 
'''Notes''': When an NPCs motivation hits 0, they're no longer motivated and will attempt to take a break
 
'''Notes''': When an NPCs motivation hits 0, they're no longer motivated and will attempt to take a break
 +
=== CreateReactable ===
 +
<syntaxhighlight source lang="lua">AI.CreateReactable(actionType, attraction, targetObject)</syntaxhighlight>
 +
'''Expected parameter types'''
 +
{| class="wikitable"
 +
|-
 +
| actionType || AIReaction+Type
 +
|-
 +
| attraction || number
 +
|-
 +
| targetObject || MissionObject
 +
|}
 +
'''Description''': Create a new distraction that AI can pick up on
 +
 +
'''Returns''': Nothing
 +
 +
=== SetNPCFavouredComputer ===
 +
<syntaxhighlight source lang="lua">AI.SetNPCFavouredComputer(characterName, computer)</syntaxhighlight>
 +
'''Expected parameter types'''
 +
{| class="wikitable"
 +
|-
 +
| characterName || string
 +
|-
 +
| computer || MissionObject
 +
|}
 +
'''Description''': Set NPC's computer, this will be used for a variety of actions
 +
 +
'''Returns''': Nothing
 +
 +
  
 +
This file is auto generated, please don't edit manually!
  
'''Docs last hacked together on''': 09/05/2017 12:04
+
'''Docs last hacked together on''': 13/09/2017 13:56

Revision as of 12:56, 13 September 2017

AI

Description

API to control the logic of AI in the mission

Functions

AlterNPCMotivation

AI.AlterNPCMotivation(characterName, motivationDelta)

Expected parameter types

characterName string
motivationDelta number

Description: Alters an NPCS motivation state

Returns: Nothing

Notes: When an NPCs motivation hits 0, they're no longer motivated and will attempt to take a break

CreateReactable

AI.CreateReactable(actionType, attraction, targetObject)

Expected parameter types

actionType AIReaction+Type
attraction number
targetObject MissionObject

Description: Create a new distraction that AI can pick up on

Returns: Nothing

SetNPCFavouredComputer

AI.SetNPCFavouredComputer(characterName, computer)

Expected parameter types

characterName string
computer MissionObject

Description: Set NPC's computer, this will be used for a variety of actions

Returns: Nothing


This file is auto generated, please don't edit manually!

Docs last hacked together on: 13/09/2017 13:56