From f2c32d262fabeded8eb5037e9e676bc07d937e9c Mon Sep 17 00:00:00 2001 From: spencershepard Date: Sat, 8 Jan 2022 22:31:08 -0800 Subject: [PATCH] Created Advanced Usage: Useful AI Functions (markdown) --- Advanced-Usage:-Useful-AI-Functions.md | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Advanced-Usage:-Useful-AI-Functions.md diff --git a/Advanced-Usage:-Useful-AI-Functions.md b/Advanced-Usage:-Useful-AI-Functions.md new file mode 100644 index 0000000..4a111f9 --- /dev/null +++ b/Advanced-Usage:-Useful-AI-Functions.md @@ -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) +``` \ No newline at end of file