-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AI functions #333
Update AI functions #333
Commits on May 19, 2016
-
Add an AI function to correctly clear all waypoints
Unfortunately clearing all waypoints from AI is not as simple as deleting them all with `deleteWaypoint`. You have to kill their pre-planned movement (based on old waypoints) by having them complete at least one waypoint. One solution is to move all of their old waypoints to their position before deleting them, however if waypoint statements are being used this could have adverse effects. So this function creates a fresh waypoint for the purpose of killing their movement. It is also self-deleting (through its completion statement) to avoid any possible issues with timing.
Configuration menu - View commit details
-
Copy full SHA for 25dcc95 - Browse repository at this point
Copy the full SHA 25dcc95View commit details -
- Retain open building positions to make groups defending overlapping areas respect one another. - Use new A3 scripting commands to optimise and enhance the function. - Makes the function a lot more readable with comments and more spacing. - Capitalize commands and function names appropriately. - Any existing waypoints are cleared before defending begins.
Configuration menu - View commit details
-
Copy full SHA for 678bb64 - Browse repository at this point
Copy the full SHA 678bb64View commit details -
- The `cycle` waypoint is placed back at the start of the loop instead of randomly within the radius. - Any existing waypoints are cleared before the patrol loop is created. - `_this` is now correctly private.
Configuration menu - View commit details
-
Copy full SHA for 752e186 - Browse repository at this point
Copy the full SHA 752e186View commit details
Commits on May 20, 2016
-
Update taskSearchArea AI function
- Any existing waypoints are now cleared before the searching begins. - The recursive argument check is now more explicit.
Configuration menu - View commit details
-
Copy full SHA for b4f6277 - Browse repository at this point
Copy the full SHA b4f6277View commit details -
Update searchNearby AI function
- Now callable (by including the spawn within the function). - Accounts for units being killed while searching and dispatches all available units to search simultaneously. - Doesn't permanently change behaviour of the group if the function aborts due to building distance. - Optimized with new A3 commands and made more readable with comments and spacing.
Configuration menu - View commit details
-
Copy full SHA for fd36422 - Browse repository at this point
Copy the full SHA fd36422View commit details
Commits on May 21, 2016
-
Fix v1.54 compatiblity of fnc_taskDefend
Commented out the part that isn't easily regex replaced so that it can be uncommented in future.
Configuration menu - View commit details
-
Copy full SHA for 9c823f3 - Browse repository at this point
Copy the full SHA 9c823f3View commit details -
Restore fnc_searchNearby leader behaviour
In actuality this is something of a compromise. Having the leader enter the building was not an intentional change I made. However it makes sense to do things that way when the group is small and so for any group with 2 or less units (includes the leader) the leader will now search the building too.
Configuration menu - View commit details
-
Copy full SHA for f27cdf3 - Browse repository at this point
Copy the full SHA f27cdf3View commit details -
Fix building search completion condition
Accounts for cases where the leader enters the building.
Configuration menu - View commit details
-
Copy full SHA for d876997 - Browse repository at this point
Copy the full SHA d876997View commit details -
Improve behaviour of fnc_searchNearby
- The group leader (and any spare units) will now wait at his current position for the search to be complete before moving on. - Waiting between orders instead of between rounds of orders should prevent congestion and decrease time gaps in the search. - Embedding the post-search code into the waypoint condition and completion removes the need to `waitUntil` while also providing built in group unit list `thisList`.
Configuration menu - View commit details
-
Copy full SHA for 5f531b5 - Browse repository at this point
Copy the full SHA 5f531b5View commit details -
Fix edge case in fnc_clearWaypoints
If a waypoint was created at index 0 before the group complete the waypoint used to reset their path, then the wrong waypoint would be deleted upon its completion.
Configuration menu - View commit details
-
Copy full SHA for 3d7f518 - Browse repository at this point
Copy the full SHA 3d7f518View commit details