-
Notifications
You must be signed in to change notification settings - Fork 8
Advanced Usage: Useful AI Functions
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.
Now you can automatically task ground units by including keywords in the group name.
- 'PATROL': Seek out objects in a small radius. If no objects or not enough objects, then random points within the radius. Infantry or vehicles.
- 'SHIFT': Periodically shift positions within a radius. Seek out roads in urban environments or random points in open environments. Vehicles.
- 'GUARD': Periodically seek out objects within a radius. Designed to simulate idle infantry movement.
- 'AGGRESSIVE': Seek out enemies in a radius.
- 'ACTIVEZONE': Move to the active conflict zone.
These can be used with the 'STATIC' keyword if you do not wish for them to be influenced by other zone-based automatic task assignments.
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")
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")
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)