Created Advanced Usage: Useful AI Functions (markdown)

spencershepard 2022-01-08 22:31:08 -08:00
parent 95ac3007b2
commit f2c32d262f

@ -0,0 +1,31 @@
# Advanced Usage: Useful Functions with or without Conflict
## External AI Tasks
The Conflict game type sets AI tasks automatically for units inside of the staging area or Conflict Zones. You can use these snippets for groups outside of these zones or for your missions that are not running a Conflict game. Again, **you probably don't need these**.
### Set infantry or ground vehicles to patrol an area
Copy and paste this into a Run Script command (advanced waypoint actions) for a group to wander an area
```
local this_group = ...
RotorOps.aiTask(this_group, "patrol")
```
### Set infantry or ground vehicles to find enemies in a radius
Copy and paste this into a Run Script command (advanced waypoint actions) for a group to seek out enemies in an area
```
local this_group = ...
RotorOps.aiTask(this_group, "aggressive")
```
### Set infantry or ground vehicles to find enemies in a zone
Copy and paste this into a Run Script command (advanced waypoint actions) for a group to seek out enemies in a trigger zone
```
local this_group = ...
local zone_name = "changeme" --add the name of your zone
RotorOps.aiTask(this_group, "aggressive", zone_name)
```