AI Lua API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| characterName || string | | characterName || string | ||
Line 22: | Line 24: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| actionType || AIReaction+Type | | actionType || AIReaction+Type | ||
Line 37: | Line 41: | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |- | ||
| characterName || string | | characterName || string | ||
Line 50: | Line 56: | ||
This file is auto generated, please don't edit manually! | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': | '''Docs last hacked together on''': 10/11/2017 11:07 | ||
[[Catagory:Modding]][[Catagory:LuaAPI]] | |||
[[ | |||
[[ |
Revision as of 11:42, 10 November 2017
AI
Description
API to control the logic of AI in the mission
Functions
AlterNPCMotivation
AI.AlterNPCMotivation(characterName, motivationDelta)
Expected parameter types
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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: 10/11/2017 11:07 Catagory:ModdingCatagory:LuaAPI