mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-29 05:17:58 +03:00
Merge branch 'lua_ai' into 'master'
Expose the argument `cancelOther` of `AiSequence::stack` to Lua Closes #7245 See merge request OpenMW/openmw!2865
This commit is contained in:
commit
7f3926db3f
3 changed files with 54 additions and 19 deletions
|
@ -1,6 +1,38 @@
|
|||
Built-in AI packages
|
||||
====================
|
||||
|
||||
Starting an AI package
|
||||
----------------------
|
||||
|
||||
There are two ways to start AI package:
|
||||
|
||||
.. code-block:: Lua
|
||||
|
||||
-- from local script add package to self
|
||||
local AI = require('openmw.interfaces').AI
|
||||
AI.startPackage(options)
|
||||
|
||||
-- via event to any actor
|
||||
actor:sendEvent('StartAIPackage', options)
|
||||
|
||||
``options`` is Lua table with arguments of the AI package.
|
||||
|
||||
**Common arguments that can be used with any AI package**
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 20 60
|
||||
|
||||
* - name
|
||||
- type
|
||||
- description
|
||||
* - type
|
||||
- string [required]
|
||||
- the name of the package (see packages listed below)
|
||||
* - cancelOther
|
||||
- boolean [default=true]
|
||||
- whether to cancel all other AI packages
|
||||
|
||||
Combat
|
||||
------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue