← Previous | Next →
wander
Description
Makes the NPC wander within a specified area, randomly moving around a central point.
| Name | Type | Possibilities |
| wander | behaviour | 1 |
Parameters
| # | Name | Type | Mandatory | Description | Multiple |
| 1 | x | number | Yes | The X coordinate of the central point. | No |
| 2 | y | number | Yes | The Y coordinate of the central point. | No |
| 3 | z | number | Yes | The Z coordinate of the central point. | No |
| 4 | radius | number | Yes | The radius within which the NPC will wander. | No |
| 5 | minDistance | number | Yes | The minimum distance the NPC will move in each step. | No |
| 6 | timeWaiting | number | Yes | The time the NPC will wait before moving to a new position. | No |
Outputs
| # | Description |
| 1 | The NPC starts wandering around the specified area. |
Example
NPC
name Explorer
model a_m_m_farmer_01
position 200.0 300.0 20.0
interaction
nothing
behaviour
wander 200.0 300.0 20.0 50.0 10.0 5.0