File: wander.rst

package info (click to toggle)
openmw 0.50.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,076 kB
  • sloc: cpp: 380,958; xml: 2,192; sh: 1,449; python: 911; makefile: 26; javascript: 5
file content (53 lines) | stat: -rw-r--r-- 1,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Wander
======

.. include:: ../version.rst

Wander nearby current position.

**Arguments**

.. list-table::
  :header-rows: 1
  :widths: 20 20 60

  * - name
    - type
    - description
  * - type
    - string [required]
    - the name of the package (see packages listed below)
  * - distance
    - float [default=0]
    - the actor to follow
  * - duration
    - number [optional]
    - duration in game time (will be rounded up to the next hour)
  * - idle
    - table [optional]
    - Idle chance values, up to 8
  * - isRepeat
    - boolean [optional]
    - Will the package repeat (true or false)

**Example**

.. code-block:: Lua

    local idleTable = {
        idle2 = 60,
        idle3 = 50,
        idle4 = 40,
        idle5 = 30,
        idle6 = 20,
        idle7 = 10,
        idle8 = 0,
        idle9 = 25
    }
    actor:sendEvent('StartAIPackage', {
        type = 'Wander',
        distance = 5000,
        duration = 5 * time.hour,
        idle = idleTable,
        isRepeat = true
    })